In Khorasan, an elderly merchant has a son named Ali Shar. After his father's death, Ali Shar inherits a fortune but soon, influenced by a bad crowd, squanders it. His friends abandon him and he is left a pauper. One day, while walking, he sees a slave girl being sold. She makes fun of the men who bid on her, and points out Ali Shar in the crowd as the master she wants. She hands him enough money to purchase her.
Her name is Zumurrud. She creates beautiful curtains for Ali Shar to sell at the market, but one day he sells it to a stranger, a Christian, who comes to his house and demands food. He is actually Barsum, the brother of Rashid al-Din, one of the men who wanted to buy Zumurrud. He drugs Ali Shar and kidnaps Zumurrud.
Zumurrud works out how to escape from his harem, but while waiting for her that night, Ali Shar falls asleep. A Kurd kidnaps Zumurrud and takes her to a cave. However, she runs away, dressing as a male soldier. She arrives in a city where the king has just passed away. Here, the custom is that the first stranger to arrive at the gate shall become the new king. As king, she arranges for a festival every month.
One month, she catches Barsum and has him executed. Then the Kurd is caught and executed, followed by Rashid al-Din. One day, finally, Ali Shar arrives and Zumurrud reveals herself to him.