A poor fisherman named Khalifah catches a one-eyed, lame ape. He is about to beat it when the ape tells him to throw his net again instead. This time Khalifah brings in a larger ape, which tells him to cast his net again. After casting his net a third time, he captures an ape belonging to Abu al-Sa’adat the Jew, which gives ten dinars every day. This ape also tells him to cast his net again, and this time he catches fish.
Khalifah must take the fish to Master Abu al-Sa'adat and arrange to switch apes with him. It works, and Khalifah becomes wealthy. However, he becomes nervous about his wealth. He carries his money with him only to drop it into the river while fishing.
Caliph Harun al-Rashid has a beautiful and accomplished slave girl, Kut al-Kulub, and even forgets his wife Zubaydah bint al-Kasim, spending all his time with Kut al-Kulub instead of praying. To distract him, Ja'afar suggests that they go hunting. They meet Khalifah, who is naked and wrapped in his net. Khalifa offers to teach the Caliph to fish, and the Caliph catches many fish which are then sold at the market.
Zubaydah, jealous of Kut al-Kulub, has her drugged and puts her into a chest, which she sells away. She tells the Caliph that Kut al-Kulub has died.
Khalifah comes to the palace to work out the fish payment. The Caliph, wanting Allah to decide his fate, writes all kinds of sums of money but also all kinds of punishments on slips of paper, and has Khalifah choose one blindly. The one Khalifah picks up says for him to be beaten a hundred time wiht a stick. The second paper says nothing shall be given to the fisherman, and the third that the fisherman shall receive one dinar. However, as Khalifah is leaving, a servant gives him a hundred dinars to pay for the fish.
In the market, Khalifah uses his hundred and one dinars to buy the chest. He takes it home but hears screaming inside, and opens it to find Kut al-Kulub. She asks for food and water and sends him to Ibn al-Kirnas the Jew with a letter, but when he comes back, she has been taken by one of the Jew's servants. He finds her at the Jew's house and takes her back to the palace. There, the Caliph rewards Khalifah with gold and slaves and forgives Zubaydah.
Khalifah lives in the palace, marries the daughter of an important man, and frequently visits the Caliph.
- The incident with a jealous Zubaydah drugging Kut al-Kulub while her husband is out hunting, placing her in a chest, and claiming she has died shows up also in the Tale of Ghanim bin Ayyub, The Distraught, The Thrall o' Love.