During the reign of Caliph Harun al-Rashid, there lives a merchant's son named Abu al-Hasan-al-Khali’a. At first he squanders his spending money and loses his friends, so he decides to live off his savings. He invites one single guest per night and then never speaks to that person again. One night he invites the Caliph and his slave Masrur in but then explains that they'll never meet again and relates the Story of the Larrikin and the Cook.
Abu mentions that he would like to be Caliph for today and get back at four shaykhs as well as the Imam. Secretly, the Caliph drugs Abu's drink and has him taken back to the Palace, where he commands everyone to pretend that Abu is the Caliph. The confused Abu slowly comes to believe it. He takes his revenge on the shaykhs and the Imam and sends money to his mother. That night, the Caliph has him drugged a second time and sent home. When his mother tells him he was dreaming, he beats her and is thrown into prison. Eventually, he is set free and goes back to his old lifestyle.
One day he meets the Caliph again. The Caliph drugs him and sends him to the palace once more, but Abu makes the servants bite him to make sure he's awake, and then takes off his clothes and dances. The Caliph begins to laugh, and makes him a favorite of the court. Abu marries Nuzhat al-Fuad, a handmaiden of Lady Zubaydah, but they live frivolously and spend all of their money.
Abu creates a plot for him and his wife to each fake their death, in order for their "widow" to get money from the Caliph and Lady Zubaydah. Later, the Caliph and Lady Zubaydah speak to each other and argue over which person is actually dead. They send servants to their home one by one to investigate, so Abu and Nuzhat continue to keep up the ruse until finally the royal couple arrives to see for themselves. Then Abu and Nuzhat both pretend to be dead. Still the Caliph and Zubaydah cannot decide who died first, and the Caliph says he would give a thousand dinars to know. Immediately the couple spring up, both claiming to have died first. The Caliph realizes it was a trick to get money, but is greatly amused, and not only gives them the thousand dinars but increases their salary.
- The Story of Abou Hassan; or, the Sleeper Awakened