Thorin and his company are being pursued by Azog and his Orc party following the events of the previous film. They are ushered along by Gandalf to the nearby home of Beorn, a skin-changer who can take the form of the bear. That night, Azog is summoned to Dol Guldur by the Necromancer, who commands him to marshal his forces for war. Azog then delegates the hunt for Thorin to his son Bolg. The following day, Beorn escorts the company to the borders of Mirkwood, where Gandalf discovers Black Speech imprinted on an old ruin. Heeding a promise he made to Galadriel, he warns the company to remain on the path and leaves to investigate the tombs of the Nazgûl. Upon entering the forest they lose their way and are ensnared by giant spiders. Bilbo then sets about freeing the dwarves with the help of his recently acquired invisibility ring. He subsequently drops the Ring and first begins to understand its dark influence after he brutally kills a creature to retrieve it.
The remaining spiders are fended off by the Wood-elves led by Tauriel and Legolas. They also capture the Dwarves, and bring Thorin before their king Thranduil. Thorin confronts the Elvenking about his neglect of the Dwarves of Erebor following Smaug's attack 60 years earlier, and is consequently imprisoned with the other Dwarves. Bilbo, having avoided capture, arranges an escape using empty wine barrels that are sent downstream. While being pursued by the Wood-elves, they are ambushed by Bolg and his Orc party, and Kíli is wounded with a Morgul shaft. They engage in a running three-way battle down the river, but ultimately the Dwarves are able to escape both groups of pursuers. Thranduil then seals off his kingdom when an Orc captive reveals an evil entity has returned and is amassing an army in the south, but Tauriel decides to leave and assist the Dwarves. Legolas goes after her. Meanwhile, Gandalf and Radagast go to investigate the tombs of the Nazgûl, which they find to be empty.
The company are smuggled into Esgaroth by a bargeman called Bard. Thorin promises the Master and the people of Laketown a share of the mountain's treasure. It is then revealed that Bard is a descendant of the last ruler of Dale, and possesses the last black arrow capable of killing Smaug. Kíli is forced to remain behind, tended to by Fíli, Óin, and Bofur, as the remaining company receive a grand farewell. Meanwhile, Gandalf travels south to the ruins of Dol Guldur, while Radagast leaves to warn Galadriel of their discovery at the tombs of the Nazgûl. Gandalf finds the ruins infested with Orcs and is ambushed by Azog. The Necromancer overpowers and defeats Gandalf and reveals himself as Sauron.
Thorin and his remaining company reach the Lonely Mountain, where Bilbo discovers the hidden entrance. He is sent in to retrieve the Arkenstone, and while doing so, he accidentally awakens Smaug. While trying to find Bilbo, Smaug reveals his knowledge of Sauron's return. Back in Laketown, Bard attempts to bring the black arrow to the town's launcher, as he fears what may happen when the Dwarves enter the mountain. However, he is arrested in the process and leaves his son to hide the arrow. Bolg and his Orc party then infiltrate the town and attack the four Dwarves, but are quickly dispatched following the arrival of Tauriel and Legolas. Tauriel then tends to Kíli. While Kíli is recovering, he openly admires Tauriel's beauty and wonders if she loves him. Legolas leaves in pursuit of Bolg. Meanwhile, Gandalf watches helplessly as Azog and an Orc army march from Dol Guldur towards the Lonely Mountain.
Back inside the mountain, during a long chase, Bilbo and the Dwarves rekindle the mountain's forge using Smaug's flames to create and melt a large golden statue, hoping to bury Smaug alive in the molten gold. They do so, but Smaug emerges from the gold, stumbles out of the mountain and flies off to destroy Laketown as Bilbo watches in horror at what they have unleashed.
- Thomas, Twilight Sparkle, Percy, Pinkie Pie, James, Rarity, Gordon, Rainbow Dash, Henry, Fluttershy, Toby, Applejack, Edward, Emily, Bill and Ben, Bertie, Terence, The Logging Locos (Bash, Dash and Ferdinand), Stephen, Luke, Spike, The Cutie Mark Crusaders (Apple Bloom, Sweetie Belle and Scootaloo), Princess Cadance, Shining Armor, Theodore Tugboat, Hank, Emily, George, Foduck, Princess Celestia, Princess Luna, Barret Barricade, Sunset Shimmer, Knockout, Puffer, Dolphy, Rachel, Mighty Joe, Daylight, Jenny, Pete, Kevin, Morley, Blitzer, Tempest Shadow, Grubber, Songbird Serenade, Capper, Captain Celaeno, Princess Skystar, Queen Novo, Ed, Edd, n Eddy, Cinderella, Dawn, Manaphy, Gordon Quid, Waffle, Mr. Blik, Doug Funnie, Skeeter Valentine, Roger Smith, Bender Bending Rodríguez, Minerva Mink, Master Shake, Meatwad, Frylock, Pazu, Sheeta, Wubbzy, Widget, Walden, Daizy, Natsu Dragneel, Lucy Heartfilia, Gray Fullbuster, Erza Scarlet, Wendy Marvell, Happy, Carla, Babs Seed, Coco Pommel, Cheese Sandwich, Maud Pie, Belle, Ariel, Princess Jasmine, Jenny Foxworth, Princess Anna, Elsa the Snow Queen, Mulan, Pocahontas, Esmeralda, Snow White, Princess Aurora, Alice, Judy Hopps, and Nick Wilde guest star in this film.
- Ernie the Giant Chicken, Sideshow Bob, R2-Q5, Bobby Briggs, Sheriff Nichols, James Woods, Hunter J, Attila and Hun, Team Galactic (Mars, Jupiter and Saturn), The Dazzlings, Diesel 10, Splatter and Dodge, Diesel, Trixie, Gilda, Lightning Dust, Diamond Tiara, Silver Spoon, Starlight Glimmer, Suri Polomare, Dawn Bellwether, Nightmare Moon, King Sombra, Discord, and Queen Chrysalis will work for Azog in this film.
- The storyline continues in Little Bear meets The Hobbit: The Battle of the Five Armies.