Aragorn, Legolas, Gimli, Gandalf, Théoden, Gamling and Éomer meet up with Merry, Pippin and Treebeard at Isengard. The group returns to Edoras, where Pippin looks into a recovered palantír which grants him a vision. While using the palantír, he is seen and mentally interrogated by Sauron. Pippin tells him nothing regarding Frodo and the Ring. From this event, Gandalf deduces that Sauron is planning to attack Minas Tirith. Gandalf rides with Pippin to find the steward Denethor. Pippin swears loyalty to Denethor, his son Boromir having saved his life at Amon Hen. Gandalf urges Denethor to call Rohan for aid, but Denethor declines, fearing Aragorn and Gandalf plan to depose him. The Morgul army, led by the Nazgûl, drive the Gondorians out of Osgiliath. Denethor sends his younger son Faramir on a suicide mission to reclaim the city. Pippin fires a beacon, signaling Théoden and Aragorn to assemble the Rohirrim for battle.
Elrond informs Aragorn that Arwen did not take the journey to the Undying Lands and is now dying. Believing their forces to be outnumbered by Sauron's, Elrond gives Aragorn the Andúril to acquire the service of the Army of the Dead, who owe allegiance to the Heir of Isildur. Éowyn confesses her love for Aragorn and asks him not to go but Aragorn reaffirms his love for Arwen. Accompanied by Legolas and Gimli, Aragorn ventures into the Paths of the Dead and gains the loyalty of the King of the Dead and his men by brandishing Andúril, proving himself the Heir of Isildur. At Dunharrow, Théoden rides off to war with over 6,000 Riders, unaware Éowyn and Merry have secretly joined his forces.
Sauron's armies lay siege to Minas Tirith with the Witch-king and his Nazgûl. Denethor attempts to burn Faramir and himself alive but Faramir is saved by Gandalf and Pippin. Denethor commits suicide. Theoden's Rohirrim army appears, charging into the Orc armies and pushing them to the verge of defeat. However, the Haradrim arrive and join the Orc army, turning the tide of battle. The Witch-king kills Theoden but is killed by Eowyn with Merry's help. On the verge of defeat, the Rohirrim are saved when Aragorn, Legolas, and Gimli arrive with the Army of the Dead. Aragorn and Gimli kill the Orc-leader Gothmog. The Army of the Dead decimate Sauron's forces, ending the Battle. Aragorn frees the Army of the Dead and their souls go to the afterlife.
Meanwhile, Frodo Baggins, Samwise Gamgee and Gollum travel to Minas Morgul to destroy the Ring. Sam overhears Gollum's plans to murder them and take the Ring for himself. To remove Sam as an obstacle, Gollum persuades Frodo that Sam wants the Ring for himself, and Frodo angrily tells Sam to go home. Sam leaves but, realizing Gollum's treachery, seeks out Frodo. Gollum betrays Frodo, leaving him in the lair of the giant spider, Shelob. Shelob paralyzes Frodo, but Sam manages to save him. An Orc battalion captures Frodo and take him to a nearby tower. Sam rescues Frodo from the tower, and they continue the journey to Mount Doom.
Aragorn leads his remaining men to the Black Gate, distracting Sauron and his forces and allowing Sam and Frodo to enter Mount Doom. Sam carries the weakened Frodo up Mount Doom but Gollum appears and attacks them. At the Crack of Doom, Frodo succumbs to the Ring's power, refusing to destroy it. Gollum bites off Frodo's finger, seizing the Ring for himself. Frodo attacks Gollum to reclaim it but they both fall over the edge. Frodo clings to the ledge but Gollum and the Ring fall into the lava. The Ring destroyed, Sauron is defeated and the destruction of his form creates an immense shockwave that kills most of the Orcs. The remaining Orcs perish as Mordor is wrecked by intense earthquakes, leaving Aragorn's men unharmed.
Left stranded by rising lava, Samwise and Frodo are saved by Gandalf, carried to safety on Eagles. In the aftermath, Aragorn is crowned King, heralding a new age of peace, and is reunited with Arwen. The four Hobbits return home to the Shire, where Sam marries his childhood sweetheart, Rosie Cotton. Frodo leaves Middle-earth for the Undying Lands with Gandalf, Bilbo, Elrond, Celeborn and Galadriel, leaving his account of the story to Sam.