- The War of the Ring
Gandalf and Pippin arrive at Minas Tirith in the kingdom of Gondor, delivering the news to Denethor, the Lord and Steward of Gondor, that a devastating attack on his city by Sauron, the Dark Lord of Mordor is imminent. Pippin then enters the service of the Steward as repayment of a debt he owes to Boromir, Denethor's dead son and preferred heir. Now clad in the uniform of the tower guard, Pippin watches the fortunes of war unfold, while Denethor descends into madness as the hosts of Mordor press ever closer to Gondor's capital city of Minas Tirith. Faramir, Boromir's younger brother, returns from his campaign with the shattered remnants of his company and is soon ordered to ride out and continue the hopeless defence of Osgiliath against a horde of orcs. Osgiliath is soon overrun and a gravely wounded Faramir is carried back to Denethor. His people seemingly lost and his only remaining son all but dead, Denethor orders a funeral pyre built that is to claim both him and his dying son. Minas Tirith stands encircled and besieged by the armies of Mordor.
Meanwhile, in Rohan, Théoden and his Rohirrim are recovering from the Battle of the Hornburg, in which they defended Rohan against the forces of Saruman at great cost. Aragorn, having confronted Sauron through the palantír of Isengard, sets out to find the lost army of the undead oathbreakers who dwell in the Paths of the Dead, a mountain hall where they have been enslaved since their treachery ages ago. Helped by his companions Legolas and Gimli as well as a Company of Rangers from Arnor in the north (the "Grey Company"), he sets out to recruit the Army of the Dead to his cause. As Aragorn departs on his seemingly impossible task, King Théoden musters the Rohirrim to come to the aid of Gondor. Merry, eager to go to war with his allies, is refused by Théoden several times. Finally Dernhelm, one of the Rohirrim, takes Merry up on his horse, and secretly rides with the rest of the Rohirrim.
The hosts of Mordor, led by the dreaded Witch King of Angmar, succeed in breaking through the gates of Minas Tirith, but are in turn crushed by the arriving cavalry of Rohan. The battle is also joined by a "black fleet with black sails". The forces of Mordor initially rejoice at its arrival; and then are horrified to see the banner of the King upon the ships. Aragorn has succeeded in using the Oathbreakers to defeat the Corsairs of Umbar; the men of Gondor who were once slaves on the ships are brought back to fight the host of Mordor. In the following Battle of the Pelennor Fields the Witch-king is slain by Dernhelm, revealed to be Éowyn the niece of King Théoden, with help from Merry. Thus the siege is broken, but at heavy cost: many warriors of Gondor and Rohan fall, among them King Théoden. Denethor immolates himself and Faramir on his funeral pyre, but Gandalf and Pippin succeed in saving Faramir, who is subsequently healed by Aragorn. Aragorn also heals Merry and Éowyn, who were hurt by the Witch-king before he fell. Knowing that it is only a matter of time before Sauron rebuilds his forces for another attack, Gandalf and Aragorn decide to draw out the hosts of Mordor with an assault on the Black Gate, providing a distraction so that Frodo and Sam may have a chance of reaching Mount Doom and destroy the One Ring, unseen by the Eye of Sauron. Gandalf and Aragorn lead an army to the Black Gate of Mordor and lay siege to Sauron's army. The battle begins and the body of a troll he had killed falls onto Pippin, and he loses consciousness just as the Great Eagles arrive.
- The Return of the King
Sam, who now bears the One Ring in Frodo's place, rescues his master from torture and death by Orcs in the Tower of Cirith Ungol. The two navigate the barren wasteland of Mordor and are overtaken by a company of Orcs but escape and are forced to disguise themselves in Orcish armour. Gandalf's plan to distract Sauron from the Ring is successful: Mordor is almost empty as all the remaining Orcs have been summoned to defend the land against the assault of the army led by Gandalf and Aragorn. Frodo and Sam, after a weary and dangerous journey, finally reach their final destination of the Crack of Doom. As Frodo is about to throw the Ring into Mount Doom, he succumbs to the Ring's power and refuses to let it go. Just then, Gollum, who had been following the pair still, attacks Frodo and bites off his finger, along with the Ring. Gollum gloats over getting his prize back, but loses his balance and falls into the lava below, taking the Ring with him. The Ring is destroyed, freeing Middle-earth from Sauron's power. Frodo and Sam are rescued by the Great Eagles, who carry them from Mount Doom. Upon Sauron's defeat, his armies at the Gate flee. Sauron finally appears as a gigantic shadow trying to reach out for the armies of men, but is now powerless and is blown away by a wind. The men under Sauron's command that surrender are forgiven and allowed to return to their lands in peace.
Aragorn is crowned King of Gondor outside the walls of Minas Tirith in a celebration during which all four Hobbits are greatly honoured for their contribution to the War of the Ring. A healed Faramir is appointed Prince of Ithilien and Steward of Gondor, and Aragorn marries Arwen, daughter of Elrond of Rivendell. After a series of goodbyes, the Hobbits return home to find the Shire in ruins, its inhabitants oppressed by Lotho Sackville-Baggins (usually called "The Chief" or "The Boss") who is in reality controlled by a shadowy figure called "Sharkey". Sharkey has taken complete control of the Shire using corrupt Men, and begins felling trees in a gratuitous program of industrialization (which actually produces nothing except destruction and misery for the locals). Merry, Pippin, Frodo and Sam make plans to set things right once more. They lead an uprising of Hobbits and are victorious at the Battle of Bywater which effectively frees the Shire. At the very doorstep of Bag End, they meet Sharkey, who is revealed to be the evil wizard Saruman, and his servant Gríma. Obstinate in defeat, Saruman abuses Gríma, who responds by slitting his master's throat. Gríma is himself slain by hobbit archers as he attempts to escape.
Over time the Shire is healed. The many trees that Saruman's men cut down are replanted; buildings are rebuilt and peace is restored. Sam marries Rosie Cotton, with whom he had been entranced for some time. Merry and Pippin lead Buckland and Tuckborough to greater achievements. Frodo, however, cannot escape the pain of his wounds, having been stabbed by the Witch-king and poisoned by Shelob. Eventually he departs for the Undying Lands in the West, with Gandalf, Bilbo Baggins, and many Elves, ending the Third Age. Sam, Merry and Pippin watch them depart and return home. Now heir to all of Frodo's possessions, Sam is greeted by his wife Rosie and his daughter Elanor and delivers the final spoken words of the book: "Well, I'm back."