The Magician, Prospero, rightful Duke of Milan, and his daughter, Miranda, have been stranded for twelve years on an island after Prospero's jealous brother Antonio (aided by Alonso, the King of Naples) deposed him and set him adrift with the then-3-year-old Miranda. Gonzalo, Alonso's counselor, had secretly supplied their boat with some food, fresh water, "rich garments, linens, stuffs and necessaries," and "volumes" (books) that Prospero prizes. Possessing magic powers due to his great learning, Prospero is reluctantly served by a spirit, Ariel, whom Prospero had rescued from a tree in which he had been trapped by the cruel witch, Sycorax, after he had refused to obey her. Prospero maintains Ariel's loyalty by repeatedly promising to release the "airy spirit" from servitude. Sycorax had been exiled from Algiers to the island for wreaking havoc with her magic, and had died before Prospero's arrival. Her son, Caliban, a deformed monster and the only non-spiritual inhabitant before the arrival of Prospero, was initially adopted and raised by him. He taught Prospero how to survive on the island, while Prospero and Miranda taught Caliban religion and their own language. Following Caliban's attempted rape of Miranda, he had been compelled by Prospero to serve as the magician's so-called slave. In slavery, Caliban has come to view Prospero as a usurper and has grown to resent him and his daughter. Prospero and Miranda in turn view Caliban with disappointment, contempt and disgust. Prospero only performs one act of magic himself directly on stage: he disarms Ferdinand, causing his nerves to become "in their infancy again." The rest of his magic is through controlling spirits (or mentioned as happening previously), which is how magicians of the time were believed to operate.
The play opens as Prospero, having divined that his brother, Antonio, is on a ship passing close by the island, has raised a tempest which causes the passengers to believe they are shipwrecked and marooned. Also on the ship are Antonio's friend and fellow conspirator, King Alonso of Naples, Alonso's brother and son (Sebastian and Ferdinand, respectively) and Alonso's "trusted counselor," Gonzalo. All these passengers are returning from the wedding of Alonso's daughter Claribel with the King of Tunis. Prospero contrives to separate the shipwreck survivors into several groups by his spells, and so Alonso and Ferdinand are separated, each believing the other to be dead.
Three plots then alternate through the play. In one, Caliban falls in with Stephano and Trinculo, two drunkards, believing Stephano to be a "brave god" who "bears celestial liquor." They attempt to raise a coup against Prospero, which ultimately fails. In another, Prospero works to encourage a romantic relationship between Ferdinand and Miranda; the two fall immediately in love, but Prospero worries that "too light winning [may] make the prize light," and compels Ferdinand to become his servant, pretending that he regards him as a spy. In the third subplot, Antonio and Sebastian conspire to kill Alonso and Gonzalo so that Sebastian can become King. Ariel thwarts them, at Prospero's command. Ariel appears to the "three men of sin" (Alonso, Antonio and Sebastian) as a harpy, reprimanding them for their betrayal of Prospero. Prospero, who has witnessed this, lanes to visit Ferdinand and Miranda. The three guilty nobles run off, distracted and in a frenzy, and Gonzalo and the attendant lords chase after to prevent them from "what this ecstasy may now provoke them to."
Prospero then explains that he tested Ferdinand, and betroths a willing Miranda to him. He then asks Ariel to bring some other spirits and create a masque to entertain the young couple. These spirits present a blessing by Iris, Ceres, and Juno, followed by dancing. Prospero suddenly remembers the plot against his life, dismisses the spirits and Miranda and Ferdinand, and sets a trap for Caliban, Trinculo, and Stephano. They are chased offstage by goblins in the shape of hounds.
Prospero, all his enemies in his power, discovers that Ariel would pity them if he were "human," and decides to forgive the people who tried to kill him. He tells Ariel to fetch the nobles while he breaks his charms.
In the conclusion, all the main characters are brought together before Prospero, who forgives Alonso, Antonio and Sebastian. Ariel is charged to prepare the proper sailing weather to guide the King's ship back to the Royal fleet and then to Naples, where Ferdinand and Miranda will be married. After discharging this task, Ariel will finally be free. Prospero pardons Caliban, who is sent to prepare Prospero's cell, to which Alonso and his party are invited for a final night before their departure. (It is however not made clear whether, after their departure, Caliban will remain on the island or whether he will be taken to Naples). Prospero indicates that he intends to entertain them with the story of his life on the island. Prospero has resolved to break and bury his magic staff, and "drown" his book of magic, and in his epilogue, shorn of his magic powers, he invites the audience to set him free from the island with their applause.