Omar bin al-Nu'uman is a powerful emperor over Baghdad, India, China, al-Hijaz, Yemen, Mesopotamia, Sudan, and many islands. He has 360 concubines and only one son, Sharrkan. One day, a concubine named Sophia bears Omar twins - a girl, Nuzhat al-Zaman, and a boy, Daw’ al-Makan. Sharrkan is not aware of his brother's existence and so doesn't think his right to the throne is threatened.
Afridun, king of Constantinople, calls for help in a war against Cesarea, which started over a priceless piece of jewelry stolen by pirates. Omar's advisor Dandan advises him to help, so Dandan and Sharrkan set out with an army. Sharrkan wanders off from camp and finds some women wrestling near a Christian monastery. One of the women challenges Sharrkan to wrestle, on the condition that the loser will be the winner's prize. Though a great fighter, Sharrkan is so befuddled by her beauty that he loses three times. She takes him to the monastery, where they eat and listne to musicians, and she tests him by having him recite poetry and play chess. Still confused by her beauty, he continues to lose.
The next morning, Byzantine troops arrive and capture Sharrkan. It is revealed that the young woman is Abriza, daughter of King Hardug of Caesarea, and Afridun was double-crossing Sharrkan and planning to capture him. (Sophia the concubine is Afridun's daughter, and he plans to get her back by using Sharrkan as a hostage.) Abriza tells the soldiers that Sharrkan is her guest, and she and her army of girls accompany his group back to Baghdad. She brings with her the priceless piece of jewelry, and Omar takes the three gems from it and gives one to each of his three children. Sharrkan is infuriated to learn that his brother's birth was kept hidden from him, and gives his gem to Abriza.
While Sharrkan is away, Omar drugs and rapes Abriza. The outraged and pregnant woman leaves with a handmaiden and a slave and travels home, but never makes it. She gives birth in the desert. A male slave in her company lusts after her and, when she refuses him, kills her. Her father, King Hardub, arrives too late.
Sharrkan becomes governor of Damascus. Daw' al-Makan, now an adult, asks permission to go on pilgrimage to Mecca, but his father wil not allow it. He and his twin sister Nuzhat run away to join the caravan, but in Jerusalem, Daw' al-Makan falls gravely ill. With no money left, Nuzhat al-Zaman tries to become a servant, but is abducted and sold as a slave in Baghdad. She is eventually sold to the governor, Sharrkan, who - not realizing that she's his sister - frees and marries her.
She bears a daughter, Qudiya fa-kan, and gives her her gem. Sharrkan recognizes the gem and realizes that she's his sister. They decide to pretend that the girl's father is Sharrkan's chamberlain, and Nuzhat marries him instead. Meanwhile, Daw' al-Makan searches Jerusalem for his sister, but is sick and dying and is thrown on a garbage heap. A stoker finds him and nurses him to health, and goes with him to Damascus, where they meet the caravan of Nuzhat and her new husband. The twins are reunited and, upon reaching Baghdad, learn that Omar bin al-Nu'uman has died. He was poisoned by a disguised Dhat al-Dawahi, King Hardub’s mother and Abriza’s grandmother, in revenge for Abriza. She also took Sophia the concubine with her.
Daw' al-Makan, now the new sultan, calls Sharrkan to help him attack the Byzantines and avenge their father. He also marries a concubine. Their armies face the Byzantine kings Hardub and Afridun and an army of Christian soldiers. The Muslims win the first battle, but Dhat al-Dawahi disguises herself as a holy man and lures Daw' al-Makan, Sharrkan and Dandan to a monastery in search of treasure. They are attacked and captured, but while the enemy army is drunk and celebrating, they escape. They join the siege of Constantinope. Afridun wounds Sharrkan, and Daw' al-Makan kills Hardub. Hardub's enraged mother, Dhat al-Dawahi, murders Sharrkan with a poisoned knife and flees.
Dandan tells the grieving Daw' al-Makan stories of kings and lovers.
The siege of Constantinople continues for four years before Daw' al-Makan and Dandan return to Baghdad to regroup. Daw' al-Makan appoints the stoker who saved his life as the new governor of Damascus. DAw' al-Makan's son, Kanmakan, grows up alongside Nuzhat al-Zaman’s daughter Qudiya Fa-kan.
After Daw’ al-Makan's death, the chamberlain takes over, dubbing himself King Sasan, and throws Kanmakan out of the palace. Kanmakan wanders through the desert and befrinds Sabbah, a bedouin. The pair meet a dying stranger on a horse, which the stranger explains originally belonged to the king of Constantinople and was used by Dhat al-Dawahi for a mission to make a peace treaty with King Sasan.
Dandan the Vizier goes to India to gather an army against King Sasan. Kanmakan returns to Baghdad to challenge the king. His old nurse visits him and lulls him to sleep with a story.
- Tale of the Hashish Eater
When he falls asleep, she tries to kill him, but is stopped by Nuzhat al-Zaman. Kanmakan's group teams with Dandan, but they are captured by the Byzantine king Rumzan. Before they can be executed, the king's nurse enters and reveals that Rumzan is actually Nuzhat al-Zaman's half brother, the child of Abriza. The three gems serve as proof. Kanmakan and Rumzan march together on Baghdad and take turns as sultan.
One day, a merchant complains about Arabs and Kurds robbing his caravan. The merchant turns out to be the same man who bought Nuzhat al-Zaman and sold her to Sharrkan, and one of the robbers is the Bedouin who originally kidnapped her. The Bedouin tells his story.
- Tale of Hammad the Badawi
Nuzhat al-Zaman kills him, and Rumzan kills the slave who murdered Abriza. Kanmakan kills th camel driver who once threw Daw' al-Makan on a garbage heap. Finally, they lure Dhat al-Dawahi to Baghdad, disguise themselves as Franks, and ambush and kill her.