There are two brothers, King Shahriyar and King Shah Zaman. Shah Zaman is preparing to visit his brother when he finds his queen in bed with a black cook. He kills both and proceeds with his visit, telling no one. One night, while Shahriyar is out hunting, Shah Zeman looks out his window and sees Shahriyar's queen embracing a black slave. He tells his brother as soon as he returns.
They go to the seaside, where they see a Jinni or Ifrit who keeps a lady trapped in a casket. He falls asleep with his head in her lap, and while he's sleeping she demands to have relations with the two kings, and keeps their signet rings. Concluding that all woman are unfaithful, they decide never to marry again. King Shahriyar has his wife and her lover executed, but additionally swears that whenever he marries he will kill his wife after taking her maidenhead. For three years, he marries women only to kill them the next morning. One day, his Wazir can find no more virgins. He has two daughters, Scheherazade and Dunyazad. The witty and well-read Scheherazade volunteers as the new bride. The Wazir is reluctant, and tells her the story of the Bull and the Ass. However, Scheherazade has her way, and instructs her younger sister to ask for a story when she is with the King.
That night, Scheherazade weeps and tells the king she would like to see her sister before she dies. Dunyazad is brought in and, as instructed, asks for a story. Thus begins the first night of the Thousand and One Nights.
The story is concluded in the Conclusion of Shahrazad and Shahryar.