The main frame story concerns Shahryar, whom the narrator calls a "Sasanian king" ruling in "India and China". He is shocked to discover that his brother's wife is unfaithful; discovering his own wife's infidelity has been even more flagrant, he has her executed: but in his bitterness and grief decides that all women are the same. Shahryar begins to marry a succession of virgins only to execute each one the next morning, before she has a chance to dishonour him. Eventually the vizier, whose duty it is to provide them, cannot find any more virgins. Scheherazade, the vizier's daughter, offers herself as the next bride and her father reluctantly agrees. On the night of their marriage, Scheherazade begins to tell the king a tale, but does not end it. The king, curious about how the story ends, is thus forced to postpone her execution in order to hear the conclusion. The next night, as soon as she finishes the tale, she begins (and only begins) a new one, and the king, eager to hear the conclusion, postpones her execution once again. So it goes on for 1,001 nights.
The tales vary widely: they include historical tales, love stories, tragedies, comedies, poems, burlesques and various forms of erotica. Numerous stories depict jinns, ghouls, apes, sorcerers, magicians, and legendary places, which are often intermingled with real people and geography, not always rationally; common protagonists include the historical Abbasid caliph Harun al-Rashid, his Grand Vizier, Jafar al-Barmaki, and the famous poet Abu Nuwas, despite the fact that these figures lived some 200 years after the fall of the Sassanid Empire in which the frame tale of Scheherazade is set. Sometimes a character in Scheherazade's tale will begin telling other characters a story of his own, and that story may have another one told within it, resulting in a richly layered narrative texture.
The different versions have different individually detailed endings (in some Scheherazade asks for a pardon, in some the king sees their children and decides not to execute his wife, in some other things happen that make the king distracted) but they all end with the king giving his wife a pardon and sparing her life.
The narrator's standards for what constitutes a cliffhanger seem broader than in modern literature. While in many cases a story is cut off with the hero in danger of losing his life or another kind of deep trouble, in some parts of the full text Scheherazade stops her narration in the middle of an exposition of abstract philosophical principles or complex points of Islamic philosophy, and in one case during a detailed description of human anatomy according to Galen—and in all these cases turns out to be justified in her belief that the king's curiosity about the sequel would buy her another day of life.