Awakening from a dream of Gandalf the Grey battling the Balrog, Frodo Baggins and his friend Samwise Gamgee find themselves lost in the Emyn Muil near Mordor and soon become aware that they are being stalked by Gollum, the former owner of the One Ring. After capturing him, a sympathetic Frodo decides to use Gollum as a guide to Mordor, despite Sam’s objections.
Meanwhile, Aragorn, Legolas and Gimli pursue the Uruk-hai to save their companions Merry and Pippin. The Uruk-hai are ambushed by a group of Rohirrim, while the two Hobbits escape into Fangorn Forest and encounter Treebeard, an Ent. Aragorn’s group later meets the Rohirrim and their leader Éomer, who reveals that they have been exiled by their king Théoden who is being manipulated by Saruman and his servant Gríma Wormtongue into turning a blind eye to Saruman’s forces running rampant in Rohan. While searching for the Hobbits in Fangorn, Aragorn’s group encounters Gandalf, who, after succumbing to his injuries while killing the Balrog in Moria, has been resurrected as Gandalf the White to help save Middle-earth.
Aragorn’s group travels to Rohan’s capital city Edoras, where Gandalf releases Théoden from Saruman’s influence and Wormtongue is banished. After learning of Saruman’s plans to wipe out Rohan with his Uruk-hai army, Théoden decides to evacuate his citizens to Helm’s Deep, an ancient fortress that has provided refuge to Rohan’s people in times past, while Gandalf departs to acquire the aid of Éomer’s army. Aragorn establishes a friendship with Théoden’s niece, Éowyn, who quickly becomes infatuated with him. That night, Aragorn experiences a dream of him meeting with Arwen who then tells him that he must depart with Frodo and reassures him when he doesn’t feel confident enough that his path is set for him. When the refugees come under attack by Warg-riding Orcs sent by Saruman, Aragorn falls off a cliff and is presumed dead. However, he is awoken by his horse Brego and rides to Helm’s Deep. That same night, Arwen is told by her father Elrond that Aragorn will not be returning. He tells her that if she remains in Middle-Earth, only death and destruction await her, even if Aragorn were to survive and become King of Gondor, and if Sauron is defeated again, she will die alone. This convinces her to reluctantly depart for Valinor. The defenders at Helm’s Deep are joined by a detachment of Elves from Lothlórien. The Uruk-hai army arrives at Helm’s Deep that night and a night-long battle ensues. The Uruk-hai breach the outer wall using gunpowder-like explosives and force the remaining defenders to retreat into the inner castle.
Merry and Pippin, having convinced Treebeard that they were allies, are brought to an Ent Council in Fangorn where the Ents decide not to assist in the war. Pippin then tells Treebeard to take them in the direction of Isengard, where they witness the devastation caused to the forest by Saruman’s war efforts. An enraged Treebeard summons the Ents and they storm Isengard, drowning the orcs by breaking their river dam and stranding Saruman in Orthanc.
At Helm’s Deep, Aragorn convinces a despairing Théoden to ride out and meet the Uruks in one last charge. Gandalf and Éomer’s horsemen arrive at sunrise, turning the tide of the battle. The Uruk-hai flee into Fangorn forest, which has moved closer to the battle at the urging of Treebeard, where they are destroyed. Gandalf warns that Sauron’s retaliation will be terrible and swift.
Meanwhile, Gollum leads Frodo and Sam through the Dead Marshes to the Black Gate but convinces them to enter Mordor by an alternative route. Frodo and Sam are captured by the Rangers of Ithilien led by Faramir, brother of the late Boromir. Frodo helps Faramir catch Gollum to save him from being killed and Faramir learns of the One Ring and takes his captives with him to Gondor to win his father’s respect. While passing through the besieged Gondorian city of Osgiliath, Sam reveals that Boromir was driven mad by the Ring and tried to take it. An attacking Nazgûl nearly captures Frodo, who momentarily attacks Sam before coming to his senses, forcing Sam to remind him that they are fighting for the good still left in Middle-earth. Faramir is impressed by Frodo and releases them along with Gollum. While leading the hobbits once more, Gollum decides to take revenge on Frodo and reclaim the Ring by leading the group to “Her” upon arriving at Cirith Ungol.