The Visier travels to Samarkand to invite Shahzaman to visit his brother in India. The Visier camps with his retinue outside the city. King Shahzaman goes to the camp to visit with the Visier, BUT, unknown to his wife, the Queen, he returns to his palace in the middle of the night. Shahzaman finds his Queen in bed with the cook, and becomes so enraged that he kills them both with his sword. He says nothing of this to anyone, and leaves with the Visier to visit his brother, Shahrayar.
One day, while Shahrayar is out hunting, Shahzaman stays in the palace feeling very depressed about his dead wife. He looks out at the garden and sees his brother's wife enter the garden with twenty slave girls, ten white and ten black. They undress and prove to be ten men and ten women, who proceed to have sex together, while another slave, Mas'ud, jumps down from a tree when the Queen calls to him and they have sex. Then they all re-garb as slave girls, except for Mas'ud who jumps back over the wall and is gone.
Shahzaman marvels that his fate is not so bad as his brother's, and consequently he feels much better.
When Shahrayar returns, he notices that his brother is more cheerful and asks why. Shahzaman tells him and Shahrayar insists on seeing his Queen deceiving him. This is done and he is enraged and suggests to his brother that they leave the kingdom and seek a lover who is even MORE unfortunate than they are. Only if they find him will they return home.
They travel to the sea shore where they hear a great commotion. A black pillar emerges from the sea until it touches the clouds. It is a huge demon carrying a glass chest locked with four padlocks. The demon wades to shore and stops under the tree where the two brothers are hiding. He unlocks