The Two Towers begins where The Fellowship of the Ring left off, after Sam and Frodo depart from the rest of the Fellowship to take the Ring to Mordor. Aragorn, while searching for Frodo, finds Boromir dying in the wake of a battle with a number of orcs. Boromir reveals that Merry and Pippin have been kidnapped by the orcs, who mistook them for the Ring-bearer. After giving Boromir a funeral on the river, Aragorn, Legolas, and Gimli decide to pursue the orcs and rescue Merry and Pippin.
They track the orc company through the valleys of Rohan, but the orcs move faster than them, traveling through the night. On the fourth day of their chase, they encounter the riders of Rohan and exchange news with Éomer, the riders’ leader, who reveals that they have killed the entire orc company. Éomer urges Aragorn to give up his search for the hobbits and instead return with him to meet Théoden, the king of Rohan, but Aragorn refuses to speak to Théoden until his quest to find the hobbits is complete. He, Legolas, and Gimli travel on towards Fangorn Forest, where the riders of Rohan fought the orc company.
Meanwhile, Merry and Pippin are forced to march with the orc company, made up of several different tribes who frequently fight amongst themselves. During a scuffle, when the orcs are distracted, Pippin manages to free his hands, wrapping the bindings back around his wrists so the orcs don’t notice, and drop the brooch from his cloak as a clue for Aragorn to find. The riders of Rohan pursue the orcs and surround them beside Fangorn Forest. Grishnákh, one of the Mordor orcs, kidnaps Merry and Pippin away from the Isengard orcs. When one of the riders kills Grishnákh, the hobbits escape unharmed into Fangorn forest, where they befriend an ent (a tree-herder) named Treebeard. Treebeard takes them to an assembly where the ents agree to march to war against Saruman, whose orcs abuse the forest.
Aragorn, Gimli, and Legolas track Merry and Pippin from the remains of the orc company into Fangorn Forest. There, they meet Gandalf, who perished in the Mines of Moria in The Fellowship of the Ring. He explains that he has been sent back to Middle-earth as Gandalf the White to complete his work and assures his three friends that Merry and Pippin are safe with the ents.
Gandalf leads Aragorn, Legolas, and Gimli to Edoras to meet with Théoden. There, Gandalf reveals that Théoden’s counselor Wormtongue is working for Saruman and clears Théoden’s mind of Wormtongue’s corrupting influence. As Wormtongue flees to Saruman, Théoden resolves to ride to battle to face Saruman’s army, bringing his nephew Éomer with him and leaving Rohan in the hands of his niece Éowyn.
On the road, Gandalf departs on a mysterious errand, and Aragorn continues with his friends and the riders of Rohan to the fortress at Helm’s Deep. There, Rohan’s forces are attacked by Saruman’s orcs, who greatly outnumber them. When, at dawn, Aragorn and Théoden rally their men for one final charge from the fortress, they drive the orcs out of the gates. Gandalf appears on the hill above with reinforcements made of Rohan’s scattered forces, and the orcs are caught between the two armies and defeated.
The group then travels to Isengard, which has been taken over by the ents, and find Merry and Pippin waiting by the gate to greet them. As Gandalf confronts Saruman, trapped in his tower, Wormtongue throws a palantír, a magical communication stone, down at him. When Pippin stares into it, Sauron is able to look into his mind, but Gandalf takes it from him before he can reveal any vital information. Gandalf decides to split up the group, taking Pippin and riding to Minas Tirith.
The second part of The Two Towers finds Frodo and Sam lost in the mountains on their way to Mordor with no food besides a dwindling supply of lembas bread. After Gollum follows them for several days, the hobbits finally confront him, recruiting him as their guide and making him swear on the Ring to obey Frodo. They pass through a place called the Dead Marshes, the site of a long-ago battle, where dead faces linger in the water and try to draw travelers in. Frodo is increasingly weary, burdened by the weight of the Ring and the gaze of Sauron, who searches for him.
As they travel towards the gates to Mordor, Sam insists that he and Frodo take turns sleeping and keeping watch, suspicious of Gollum, whom Sam catches debating with himself about whether to steal the Ring. When they finally reach the Black Gate of Mordor, they find it too well-guarded to enter, and Gollum convinces Frodo to follow him to a more secret path into Mordor through the mountains.
On the way, the hobbits meet a group of soldiers from Gondor led by Faramir, Boromir’s younger brother. Faramir is initially suspicious of the hobbits and interrogates Frodo about Boromir’s death and Isildur’s bane, but he decides to trust them after Sam accidentally blurts the secret that Isildur’s Bane is the Ring. Faramir promises not to take the Ring from Frodo, and when Gollum is found trespassing near their secret fortress, Faramir spares his life for Frodo’s sake. Faramir tries to dissuade Frodo from following Gollum through the hidden pass into Mordor, but Frodo is adamant that he must continue his quest.
Gollum leads the hobbits past Minas Morgul, where Frodo sees the Wraith-king and is briefly tempted to put on the Ring, then up into the mountains. Frodo guesses that a war is beginning in the West, since Sauron was massing armies around both Minas Morgul and the Black Gate. After they climb a series of staircases higher into the mountains and stop to rest, Sam wonders to Frodo if people will tell stories about them someday.
After a long absence, which makes Sam suspicious again, Gollum shows them to the next part of their journey: a dark, stuffy tunnel. Sam and Frodo lose track of Gollum somewhere along the way and realize they’ve been led into a trap. As they hear a strange hissing noise behind them, Sam suddenly remembers Galadriel’s phial and urges Frodo to use it. The phial brightens with starlight, and the hobbits see clusters of eyes following them. Frodo threatens the eyes with the phial and his sword, invoking Galadriel’s name, and the eyes disappear. The hobbits cut their way out of the tunnel, which is blocked with something like thick spiderwebs.
The many-eyed giant spider, Shelob, follows the hobbits out of her lair as soon as Sam puts the phial away. Gollum appears again, tackling Sam to the ground, but Sam fights him, and Gollum flees back into the tunnel. Sam then attacks Shelob, who looms over Frodo, and manages to stab her in the belly. He drives her back into her lair with Galadriel’s phial, shouting out an invocation in an elvish language he doesn’t speak.
Frodo is covered in spiderwebs and doesn’t appear to be breathing. Believing him to be dead, Sam reluctantly takes up the Ring, intending to finish Frodo’s quest alone. As Sam leaves Frodo’s body behind, he hears orcs approaching and puts on the Ring to become invisible. Realizing he’s made the wrong choice in leaving Frodo, Sam runs back toward Shelob’s lair to discover that the orcs have carried Frodo away.
Sam follows the orcs, listening to them talk, and realizes that Frodo is alive and merely paralyzed by Shelob’s venom. He draws his sword to charge the orcs and rescue Frodo, but he’s too far behind them. The orcs carry Frodo into the tower and close the gates, leaving Sam outside. The hobbits are separated, and Frodo is a prisoner.