Hasan of Bassorah is a young goldsmith who squanders his inheritance before falling under the spell of a wicked Persian alchemist named Bahram. The deceptive Persian pretends to teach Hasan the art of transmuting metals, but instead lures him onto a ship and carries him away to sacrifice him to the fire. After enduring months of torture, Hasan escapes during a storm that destroys the crew, eventually finding his way to the mythical Mountain of Clouds. There he discovers a wondrous palace inhabited by seven daughters of a powerful Jinn king. Hasan falls hopelessly in love with the chief princess, captures her magical feather-dress, and marries her. After bearing him two sons, the princess discovers her hidden plumage and flies back to her remote homeland in the Islands of Wak.
Heartbroken, Hasan embarks on a desperate quest to find his lost family, crossing impossible distances with the aid of powerful adepts, magical flying beasts, and legendary talismans. He eventually reaches the Islands of Wak, where his wife has been cruelly imprisoned by her stern sister, Queen Nur al-Huda, for marrying a mortal. Utilizing a stolen cap of invisibility and a rod that commands seven tribes of the Jinn, Hasan raises an army, defeats the island forces, and reconciles with the royal family. He ultimately secures his wife and children, returning triumphant to Baghdad after a series of extraordinary trials.