The hobbit Bilbo Baggins, along with the wizard Gandalf and the dwarf Thorin Oakenshield and his twelve companions, leave the Carrock after the events of the previous film. They continue east to the edge of the forest of Mirkwood where they encounter the skin-changer Beorn. Gandalf departs before the others enter Mirkwood where they are attacked by giant spiders and, except for Bilbo, are captured by Wood-elves. Bilbo helps the dwarves escape from the elves and they follow the forest river to Lake-town, where they meet the Master of the town, and Bard, a bowman and the descendant of the original Lord of Dale. After acquiring a boat and supplies from the town, the company travels to the Lonely Mountain. They eventually find the hidden door into the mountain and Bilbo enters and encounters the dragon Smaug.
In the meantime, Gandalf leads the White Council to drive the Necromancer out of Dol Guldur. Gandalf enters Dol Guldur, where he discovers the true identity of the Necromancer. The elves of Mirkwood, led by King Thranduil and his son, Legolas, must battle the orc invasions from Dol Guldur.