Prospero, the rightful duke of Milan, has been stranded for 12 years on a remote island along with his daughter Miranda, his throne having been usurped by his brother Antonio with the help of King Alonso of Naples. Through the use of magic, he creates a tempest, which shipwrecks Antonio and Alonso on the island, along with several others. Through further schemes, he reveals Antonio's treachery. Alonso is redeemed, and his son Ferdinand marries Miranda.
Twelve years prior to the start of the play, Prospero is deposed as Duke of Naples by his jealous brother and King Alonso. He and his daughter are then abandoned at sea to die. Alonso's adviser, Gonzalo, supplies them with food, and they survive to land on an island, where Prospero, a learned sorcerer, frees the trapped spirit Ariel, who becomes his indebted servant. They also find Caliban, the monstrous son of the witch Sycorax, who teaches them how to survive. In turn Caliban is treated as Prospero's son until he attempts to rape Miranda.
The play opens as Prospero has created a tempest around the ship carrying Antonio, Gonzalo, Alonso, Alonso's son Ferdinand and brother Sebastian, and several others. Prospero causes them to be washed ashore and separated into groups. Alonso and Ferdinand, separated, each believe the other to be dead. Caliban meets the shipwrecked drunkards Stephano and Trinculo, and they plan a coup against Prospero, which Prospero thwarts. Antonio and Sebastian plot to murder Alonso and have Sebastian take the throne, until Ariel confronts them. Prospero encourages Ferdinand and Miranda to fall in love, then makes Ferdinand work to prove his devotion. His enemies all in his power, Prospero has pity on them and forgives Alonso, Antonio and Sebastian. He frees Ariel, vows to give up magic, and they all return to Naples.