A raging storm at sea threatens a ship bearing Alonso, King of Naples, and his court on their voyage home from the wedding of Alonso's daughter in Tunisia. Frustrated and afraid, the courtiers and the ship's crew exchange insults as the ship goes down.
From a nearby island, Prospero, the former Duke of Milan, and his daughter Miranda watch the ship. Miranda worries about the ship's passengers, suspects that her father has created the storm using his magical powers, and begs him to calm the waters. Prospero then reveals to Miranda the details of their past, telling how, 12 years ago, his brother Antonio betrayed and overthrew him. With the help of Alonso, Antonio arranged for Prospero and Miranda to be kidnapped and set adrift at sea. Now, Prospero says, circumstances allow him to take revenge on his enemies, and for this reason he has conjured the storm.
Prospero charms Miranda, and she falls asleep. He then summons his spirit-servant Ariel, who created the storm. Ariel says that he has made sure everyone made it to the island alive, but scattered separately, then mentions that Prospero promised to free him from servitude early in return for good service. Prospero angrily reminds the spirit that he saved him from the prison in which the witch Sycorax put him. (Sycorax was the previous ruler of the island.) Ariel apologizes and follows Prospero's orders—he makes himself invisible and goes to spy on the shipwrecked courtiers. Prospero then awakens Miranda and summons his servant Caliban, the son of Sycorax. Caliban curses Prospero, and denies that he owes Prospero anything for educating him. To prove his point, he recounts how Prospero stripped him of his rulership of the island.
Meanwhile, Ariel, still invisible, leads Ferdinand, Alonso's son, to Prospero. Ferdinand and Miranda fall immediately in love, but Prospero puts a spell on Ferdinand and takes him into custody. Elsewhere, Alonso, Gonzalo (an advisor to Alonso), Antonio, and Sebastian (Alonso's brother) awaken to find themselves safely on shore. Alonso mourns, thinking that Ferdinand has drowned in the storm. Ariel enters and plays solemn music that puts Gonzalo and Alonso to sleep. While they sleep, Antonio persuades Sebastian to try to murder Alonso and become king of Naples. Ariel wakes the sleeping men just in time to prevent the deed.
On still another part of the island, Caliban encounters Alonso's butler Stephano and jester Trinculo. He mistakes them for gods because they give him wine and get him drunk. With Ariel listening in, Caliban persuades them to help him murder Prospero with the promise that he will serve them as lords of the island.
While Ferdinand does hard labor for Prospero, he encounters Miranda. They express their affection for each other. With Prospero secretly looking on, they agree to marry.
A bit later, Antonio and Sebastian resume their plot against Alonso, but Ariel again disrupts it. Appearing as a harpy, he accuses them and Alonso of overthrowing Prospero and says that only sincere repentance can save them now. Alonso immediately repents. Antonio and Sebastian pledge to fight back, but Prospero soon enchants and traps them all.
Back at Prospero's cave, Prospero gives his blessing to Miranda and Ferdinand's marriage. He summons spirits to perform an elaborate masque (dramatic performance) for the couple. Suddenly, Prospero remembers Caliban's plot to murder him. He abruptly ends the masque and, with Ariel's help, tricks and then chases off the three would-be murderers.
In the play's final scene, Prospero, with Ariel's counsel, decides that rather than taking revenge he will instead give up his magic and forgive his enemies. He presents himself to them in the robes he wore as Duke of Milan. The courtiers are astounded. Alonso apologizes and relinquishes control of Milan, though Antonio remains silent. Alonso and Ferdinand are reunited, and Alonso gives his blessing to the marriage of Miranda and Ferdinand. Prospero summons Stephano, Trinculo, and Caliban and exposes them to general scorn. Caliban curses himself for mistaking them for gods. Prospero then charges Ariel to ensure a safe voyage back to Italy for all, and then grants Ariel his freedom. The play ends with Prospero's epilogue, in which he asks the audience to applaud and set him free.