A Caliph, Abd al-Malik bin Marwan, of Damascus, is speaking with his Sultans, Kings and Grandees and their conversation turn to Solomon, who was lord over all kinds of beings. Solomon imprisoned and commanded Jinns and Marids with his ring. One man, Talib bin Sahl tells the Caliph about how his father once travelled an unknown land, where fishermen regularly caught copper bottles with the seal of Solomon. When one was opened, a Giant emerged and vanished. These Giants do not realize that Solomon is dead, and are still seeking forgiveness.
At the Caliph's request, Talib has his brother write to Musa bin Nusayr, govenor of Morocco. They form a group travelling through the desert, until they reach a hill where a horseman of brass is. They rub the statue's hand and it turns to face the city. On the way they find a black stone pillar, in which an Ifrit named Dahish, son of Al-A’amash, is imprisoned. Dahish worked against Solomon but was captured by Al-Dimiryat, the king of the Jann, and imprisoned and chained in the pillar by Solomon.
Dahish tells the group that they can find more Ifrits in brass bottles in the sea of Al-Karkar, and that the City of Brass is nearby. They find the city walls, but also marble tablets covered in warnings. They build a ladder to get over teh wall, but the first man seems to go mad and throws himself down into the city. This continues with each climber until Emir Musa goes up. By reciting from Allah's Book, he is able to avoid falling under the spell of the ten maidens in the city, who were causing men to throw themselves to their deaths.
Musa explores along the wall and finally opens the gate. Investigating, they find the corpses of the city's inhabitants. In a palace they find the enbalmed body of Tadmurah, an Amalekite princess. Against Musa's orders, Talib greedily tries to take some of her treasures. The statues begin to move and kill him.
They take some of the treasure not belonging to Tadmurah and leave. They meet a cave where some black men are staying, and are given twelve brass bottles. They arrive in Damascus and tell the Caliph everything that has occurred. He frees the Ifrits from their bottles, and the treasures are divided among the Faithful.