One year later, Thorin and his company are being pursued by Azog and his Orc party down the Carrock following their escape by eagles. After Bilbo informs the group that a massive black bear is also tracking them, Gandalf ushers them along to the nearby home of Beorn to seek his aid; Beorn is a skin-changer who sometimes takes the form of the bear. That night, Azog is summoned to Dol Guldur and instructs his son Bolg to take over the hunt for Thorin. With the aid of ponies provided by Beorn, the company reaches Mirkwood the next day, ahead of their Orc pursuers. Here Gandalf discovers Black Speech graffiti imprinted on an old ruin, coinciding with a telepathic message from Galadriel urging him to go to the High Fells, and abruptly leaves without explanation after warning them to remain on the path and wait for him before entering the Lonely Mountain. However, they lose their way and are caught by giant spiders. Bilbo, with the help of the One Ring, sets about freeing the dwarves, which results in him dropping the ring; Bilbo begins to learn of the corrupting influence the ring has on him after brutally killing a spider to retrieve it.
Just as the spiders are about to overwhelm the dwarves, a patrol of Wood Elves arrive, led by Legolas and Tauriel. The Elves kill the remaining spiders, but take the dwarves back to their underground halls. Bilbo evades capture by turning invisible with his magic ring. The Elvenking Thranduil offers to aid Thorin's quest - but wants a portion of Erebor's treasure-hoard in exchange. Thorin denounces Thranduil, who angrily decides to keep the dwarves imprisoned until Thorin relents - for years if need be, as the immortal Elves can be patient. Bilbo, however, manages to arrange an escape using empty wine barrels that are sent downstream. While being pursued by the Elves, they are ambushed by Bolg and his Orc party and Kili is wounded. Thranduil seals off his kingdom when he learns that an evil entity has returned and is amassing great power in the south, but Tauriel disobeys him and leaves to assist the dwarves, followed by Legolas. Meanwhile, Gandalf meets Radagast to investigate the tombs of the Nazgûl, which are found empty. Gandalf reveals that they answer to only one master.
The company then meets a man named Bard who smuggles them into Esgaroth, the Lake-town where the descendants of Dale now reside. Thorin promises the Master of Lake-town and its people a share of the mountain's treasure for their assistance, and receives a grand farewell. Kili is forced to stay behind, tended by Fili, Oin and Bofur. It is also revealed that Bard is a descendant of the last ruler of Dale, and possesses the last black arrow capable of defeating Smaug. Meanwhile, Gandalf returns to Dol Guldur in the south, while Radagast is sent to warn Galadriel of their discovery at the tombs. Gandalf finds the ruins infested with orcs and is subsequently attacked by Azog. While he attempts to escape, the Necromancer reveals itself, and a duel erupts between the two. The Necromancer overpowers Gandalf and reveals its true identity as the Dark Lord Sauron.
Meanwhile, Thorin and his remaining company reach the Lonely Mountain, where Bilbo discovers the hidden entrance and is sent to retrieve the Arkenstone, only to awaken Smaug. In Laketown, Bard attempts to bring the black arrow to the town's launcher, but is arrested in the process, leaving his son to hide the arrow. Kili, Fili, Oin, Bofur and Bard's daughters are then attacked by Bolg and his Orc party, who have infiltrated the town in search of Thorin. Legolas and Tauriel arrive soon after and fend off the Orcs. Legolas leaves in pursuit of Bolg, while Tauriel stays to tend to Kili; the two then acknowledge the bond that has developed between one another. Meanwhile, a defeated and imprisoned Gandalf awakens and watches as Azog and the Orc army march off towards the Lonely Mountain.
Inside the Lonely Mountain, Bilbo and the Dwarves, now being hunted by Smaug, trick the dragon into rekindling the forges, and attempt to kill him by drowning him in molten gold. However, Smaug emerges and stumbles out of the mountain, determined to destroy Lake-town and its people for aiding the Dwarves. He then takes to the air as Bilbo watches in horror at what they have unleashed.