King Shahriman is given a slave girl named Julnar the Sea-born, a Marid. Their son is Badr Basim.
When Badr is an adult and the new king, he overhears his mother and uncle Salih speaking of a bride for him. They mention Jaurahah, and at the sound of her name Badr falls in love. However, Jaurahah's father King Al-Samandal will accept no husband for her and chases Salih out of the palace. Salih responds by conquering them. Jaurahah flees to hide, and as luck would have it, winds up on the same island as Badr. She pretends to be in love with him, turns him into a bird, and abandons him there. She instructs her maidservant Marsinah to abandon Badr on the Thirsty Island to die of thirst, but Marsinah can't bring herself to do it and leaves Badr in a fruit tree.
Badr is captured and given to a King, whose wife recognizes him and restores him to human form. Badr leaves but is shipwrecked, and winds up on an island inhabited only by mules, asses, horses, and one old grocer named Abdallah. Abdallah explains that the island is ruled by the sorceress Queen Lab who turns all of her lovers into animals.
Queen Lab and Badr fall in love, but then he catches her cheating on him in the form of a bird. Abdallah tells Badr what to do. When Queen Lab tries to feed him enchanted grain, he must throw it back in her face and recite a phrase. When he does this, she turns into a she-mule, which he then attempts to sell. Unfortunately, he sells her to her own mother, who promptly turns Badr into a bird again and puts him in a cage. Abdallah hears of this and sends a message to Julnar and her mother Farashah, who assemble an army of jinn and rescue him. Now in human form again, Badr still insists that he wants to marry Jaurahah. This time, she and her father agree to the marriage.