The story takes place in both the "present day" (1987), where a grandfather reads S. Morgenstern's book, The Princess Bride, to his sick grandson in an effort to keep him company, and also within the book itself. The boy is reluctant to hear the story at first, having sacrificed his time playing video games to listen to it. Over the course of the film, however, he becomes increasingly enthralled with the tale.
Morgenstern's story begins with the young and beautiful Buttercup, who spends her days ordering her farmhand, Wesley, to do her bidding. Wesley responds only with, "As you wish." Eventually, Buttercup comes to develop feelings for Wesley after she understands that him saying "as you wish" is his way of telling her that he loves her. The two eventually fall in love. However, with no money to support Buttercup, Wesley sails away to seek his fortune with the promise that he will return and marry her. After some time, though, Buttercup is devastated to hear that Wesley's ship has been attacked by the infamous Dread Pirate Roberts, who has never been known to leave the captains of the ships he attacks alive. She therefore presumes Wesley to be dead, and swears she'll never love again.
Five years later, Buttercup is betrothed to Prince Humperdinck, despite still loving Wesley. On one of her therapeutic daily horse rides through the countryside, Buttercup is kidnapped by three outlaws posing as circus performers: a Sicilian boss named Vizzini, a giant named Fezzik, and a Spanish fencing master named Inigo Montoya, who seeks to avenge his father's murder. In time, we learn that Prince Humperdinck hired the trio to murder Buttercup and frame the rival land of Guilder, thereby giving him a reason to instigate a war with them.
A masked man in black follows the kidnappers' ship from a distance. Buttercup tries to escape the vessel but is scared back into it by the giant carnivorous eels that inhabit the water. When they reach and ascend the Cliffs of Insanity, Vizzini orders Inigo to kill the man in black pursuing them. After a lengthy sword fight, the man defeats Inigo, but merely knocks him unconscious to continue pursuing Vizzini and the others. Vizzini next orders Fezzik to stay behind and kill the man with his brute strength, but the man succeeds in choking Fezzik unconscious from behind. He then catches up to Vizzini and Buttercup and defeats the evil boss in a battle of wits by tricking him into drinking poison.
Buttercup believes the man to be the Pirate Roberts who killed Wesley and pushes him off a hill in order to escape. As he rolls down it, he calls out, "As you wish," revealing himself to be Wesley. Buttercup tumbles down the hill after him and the two reunite in the basin of a ravine. As they traverse the perilous Fire Swamp in an effort to escape Humperdinck's approaching cavalry, Wesley explains that though the pirate Roberts did in fact attack his ship, he took pity on Wesley's pleas for mercy and tales about a love to whom he must return, and instead befriended him and eventually gave him the title of the Dread Pirate Roberts, as the previous captain had done for him.
The two barely escape the swamp together, encountering plumes of fire that shoot from the ground, patches of deadly quick sand, and vicious ROUS's: Rodents of Unusual Size. When they do finally reach the other side, Humperdinck and his men are waiting for them. Before they can shoot Wesley, Buttercup bargains for his life by agreeing to marry Humperdinck on the condition that Wesley be returned safely to his ship. Though Humperdinck agrees, he secretly has his right-hand man, Count Rugen, throw Wesley into a torture chamber. Buttercup later requests that Humperdinck help her find Wesley so they may reunite again, but he deceives her by agreeing to help and then not sending her letters. We see him apparently kill Wesley in the torture chamber, after which he hurriedly marries Buttercup, though she believes that Wesley will still come for her.
Fezzik and Inigo reunite in the Forest of Thieves and discover that Count Rugen is the six-fingered man that Inigo is seeking to kill. Fezzik and Inigo decide to save Wesley because they need his strategizing mind to help them get into the castle and kill Count Rugen. They bring his "mostly dead" body to a local miracle worker named Max, who with the help of his wife Valerie revives Wesley, though he remains in a state of paralysis. Together, Fezzik, Inigo, and the all but immobile Wesley break into the castle, where Inigo finds and kills Rugen. Slowly regaining mobility, Wesley finds his way to Buttercup and stops her from killing herself by pointing out that her marriage is void because she did not say "I do." When Humperdinck finds them, Wesley bluffs his way into convincing Humperdinck to surrender, after which Buttercup ties him to a chair and escapes with the others. Wesley suggests that Inigo take over for him as the next Dread Pirate Roberts.
Back in the present day, the grandson asks his grandfather to read him the story again tomorrow. He replies happily, "As you wish."