The film is an enactment of a book read to a sick boy from Chicago, who is initially dismissive of the story, by his grandfather, with occasional interruptions of the scenes in this frame story.
A beautiful young woman named Buttercup lives on a farm in the fictional country of Florin. Whenever she instructs the farmhand Westley, he complies and answers, “As you wish.” She eventually realizes that he truly means “I love you” and that she loves him in return. He leaves to seek his fortune so they can marry, but his ship is attacked by the Dread Pirate Roberts, who is infamous for never leaving survivors, and Westley is believed dead.
Five years later, Buttercup is forced into marriage to Prince Humperdinck, heir to the throne of Florin. Before the wedding, she is kidnapped by three outlaws: a short Sicilian boss named Vizzini, a giant from Greenland named Fezzik, and a Spanish fencing master named Inigo Montoya, who seeks revenge against a six-fingered man who killed his father. The outlaws are pursued separately by a masked man in black and Prince Humperdinck with a complement of soldiers.
The man in black catches up to the outlaws at the top of the Cliffs of Insanity. He defeats Inigo in a duel and knocks him unconscious, chokes Fezzik until he passes out, and kills Vizzini by tricking him into drinking from a cup containing poison. He takes Buttercup prisoner and they flee, stopping to rest at the edge of a gorge. When Buttercup correctly guesses that he is the Dread Pirate Roberts she becomes enraged at him for killing Westley. When Buttercup sees Humperdinck and his men appearing, she shoves Roberts down a hill and wishes death upon him. As he tumbles down, he shouts, “As you wish!” Realizing Roberts is Westley, she throws herself into the gorge after him and they are reunited. Westley explains the Dread Pirate Roberts is actually a title passed on by subsequent holders: he had taken the title so the previous Roberts could retire. They pass through the dangerous Fire Swamp, which is inhabited by rodents of unusual size (ROUS), but are captured as they leave by Humperdinck and his sadistic vizier Count Rugen, who is revealed to be Inigo’s father’s killer. Buttercup agrees to return with Humperdinck in exchange for Westley’s release, but Humperdinck secretly orders Rugen to lock Westley in his torture chamber, the Pit of Despair.
When Buttercup expresses unhappiness at marrying Humperdinck, he promises to search for Westley. However, his real plan is to start a war with the neighboring country of Guilder by killing Buttercup and framing Guilder for her death (he had hired Vizzini to kill her for that same purpose). Meanwhile, Inigo and Fezzik reunite when Humperdinck orders the thieves arrested in the nearby forest, and Fezzik tells Inigo about Rugen. Inigo decides that they need Westley’s help to get into the castle. Buttercup berates Humperdinck after learning that he has not tried to find Westley; enraged, Humperdinck imprisons Buttercup in her chambers, and tortures Westley to death. Inigo and Fezzik follow the cries of anguish through the forest. They find Westley’s body and bring him to a folk healer, Miracle Max, whom Humperdinck has recently fired. He discovers that Westley is only “mostly dead” due to being sustained by his love for Buttercup, and revives him to a state of heavy paralysis.
After Westley, Inigo and Fezzik invade the castle, Humperdinck panics and orders the wedding ceremony shortened. Inigo finds and kills Rugen in a duel, repeatedly taunting him with his greeting of vengeance: “Hello, my name is Inigo Montoya. You killed my father. Prepare to die.” Westley finds Buttercup, who is about to commit suicide, assuring her that the marriage is invalid because she never said “I do”. Still partly paralyzed, he bluffs his way out of a duel with Humperdinck and they flee the castle. Westley rides away with Buttercup, Inigo and Fezzik before sharing a passionate kiss with Buttercup.
Back in the boy’s bedroom, the boy eagerly asks his grandfather to read the story to him again the next day, to which the grandfather replies, “As you wish.”