A man, Omar has three sons named Sálim, Salím and Judar. Judar is the favorite, but after his father's death, the older sons sue Judar for his portion of the inheritance. The ensuing lawsuit leaves them all ruined. The brothers beat up their mother and take her money, but Judar becomes a fisherman and shares his money with her.
It happens that Judar does not catch any fish for seven days. He goes to Lake Karun, where he meets a Moor who asks him to tie his elbows together and throw him into the lake. If he dies, Judar should pull him out. If he drowns, he should go sell the Moor's mule for a hundred dinars. The Moor dies and Judar sells the mule and uses his money to pay his debt and buy food for his mother. However, his brothers eat all of the food.
Judar returns to Lake Karun, and meets another Moor, who wants the same thing as the first one. Events repeat as before, but on the third trip to Lake Karun, the third Moor survives and resurfaces with a fish in each hand. He explains that his name is Abd al-Samad, and the other two Moors - as well as the Jew who bought the mules - are his brothers. They were students of sorcery and heard that Judar could help them find a magical ring containing a Marid, a burning sword, and other treasures.
The two fish are the Ifrits who guard the treasure. Judar agrees to go with Abd al-Saman to find the treasure, going through many tests, but failing the last one. He must wait one year for a second chance. Now he returns home, laden with treasure, but finds his mother has become a destitute beggar because of his brothers. Judar hands out food from Abd al-Saman's enchanted saddlebags and forgives his brothers, but they learn where the food is coming from, and sell him as a galley-slave. They fight over the enchanted saddlebags and are taken prisoner; the saddlebags end up in the possession of Shams al-Daulah, king of Egypt.
Judar's ship is wrecked and he eventually winds up at Mecca, where he meets Abd al-Samad once more. He receives his enchanted ring, which contains a genie named Al-Ra’ad al-Kasif. Judar wishes to go home, have his brothers freed, and regain the saddlebags and the King's treasure, as well as have a great palace and servants. However, the King's servants find his treasury empty and figure out that it was Judar. The Emir and guards are beaten when they try to enter Judar's palace; the Vizier is respectful and arranges an appointment for the King.
The King fears Judar taking over, but at the Vizier's advice has him marry his daughter, and they eventually become good friends. After Shams al-Daulah's death, Judar is the new Sultan. However, his brothers hate him and murder him with poison. Sálim cuts the ring from Judar's finger and has the Marid kill Salím, and then becomes Sultan. He claims Judar's widow, the Sultana, as his wife, and threatens people with death if they don't obey. However, the Sultana poisons him and destroys the ring and saddle-bags, and orders that the officers select a new king.