The narrative opens with the flight of King Azadbakht from a usurper and the birth of his son, Bakhtyar, whom he leaves by a bitter well in the desert. Rescued and adopted by a bandit chief, Bakhtyar eventually enters the royal service when the king recovers his throne, rising to the highest rank of trust. This elevation provokes the intense envy of ten viziers, who scheme to ruin him. Through an unfortunate chance of intoxication, Bakhtyar wanders into the private chambers of the harem, giving the viziers an opening to frame him for treason and attempted violation of the queen.
Condemned to death by the grief-stricken king, Bakhtyar requests a reprieve to prove his innocence, anchoring each day’s stay with a profound moral story that exposes the fatal consequences of human impatience and hasty judgment. Over ten days, he recounts the adventures of the ill-fated merchant, the impatient prince of Aleppo, the patient Abu Saber, the king of Yemen and his slave, the tales of King Dadin, the artifice of women in Abyssinia, the jewel-merchant, Abu Temam, and the king of Persia. Each tale mirrors a facet of the king's own rashness and the deceit of the viziers. As the final day approaches and the execution seems inevitable, the bandit chief who originally found Bakhtyar appears in the crowd, bearing the embroidered cloak and pearl bracelet left with the infant in the desert. The king recognizes the tokens, discovers the truth of his son’s identity, and turns the full weight of justice upon the treacherous viziers, elevating Bakhtyar to his rightful place upon the throne.