Approaching his 111th birthday, the hobbit Bilbo Baggins begins writing down the full story of his adventure 60 years earlier for the benefit of his nephew Frodo. Long before Bilbo's involvement, the Dwarf king Thrór brings an era of prosperity for his kin under the Lonely Mountain until the arrival of the dragon Smaug. Destroying the nearby town of Dale, Smaug drives the Dwarves out of their mountain and takes their hoard of gold. Thrór's grandson, Thorin, sees King Thranduil and his Wood-elves on a nearby hillside, and is dismayed when they leave rather than aid his people, resulting in Thorin's everlasting hatred of Elves.
In the Shire, 50-year-old Bilbo is tricked by the wizard Gandalf the Grey into hosting a party for Thorin and his company of dwarves: Balin, Dwalin, Fíli, Kíli, Dori, Nori, Ori, Óin, Glóin, Bifur, Bofur, and Bombur. Gandalf's aim is to recruit Bilbo as the company's "burglar" to aid them in their quest to enter the Lonely Mountain. Bilbo is unwilling to accept at first, but has a change of heart after the company leaves without him the next day. Travelling onward, the company is captured by three trolls after their ponies are captured. Bilbo stalls the trolls from eating them until dawn. Gandalf exposes the trolls to sunlight, turning them to stone. They search the trolls' cave and find treasure and Elven blades. Thorin and Gandalf each take an Elf-made blade—Orcrist and Glamdring, respectively. Gandalf also finds an elven shortsword ("Sting"), which he gives to Bilbo.
The wizard Radagast the Brown finds Gandalf and the company, and recounts an encounter at Dol Guldur with the Necromancer, a sorcerer who has been corrupting Greenwood with dark magic. Chased by Orcs, Gandalf leads the company through a stone passage to Rivendell. There, Lord Elrond discloses a hidden indication of a secret door on the company's map of the Lonely Mountain, which will be visible only on Durin's Day. Gandalf later approaches the White Council — consisting of Elrond, Galadriel and Saruman the White — and presents a Morgul blade, a weapon of the Witch-king of Angmar, Radagast obtained from Dol Guldur as a sign that the Necromancer is linked to an eventual return of the Great Enemy. While Saruman presses concern to the more present matter of the dwarves' quest, requesting that Gandalf put an end to it, Gandalf secretly reveals to Galadriel he had anticipated this and had the dwarves move forward without him.
The company journeys into the Misty Mountains where they find themselves amid a colossal battle between stone giants. They take refuge in a cave and are captured by Goblins, who take them to their leader, the Great Goblin. Bilbo becomes separated from the dwarves and falls into a crevice where he encounters Gollum, who unknowingly drops a golden ring. Pocketing the ring, Bilbo finds himself confronted by Gollum. They play a riddle game, wagering that Bilbo will be shown the way out if he wins or eaten by Gollum if he loses. Bilbo eventually wins by asking Gollum what he has in his pocket. Noticing his ring is lost, Gollum realizes that Bilbo possesses it and chases him. Bilbo discovers that the ring grants him invisibility, but when he has a chance to kill Gollum, Bilbo spares his life out of pity and escapes while Gollum shouts his hatred towards the hobbit Baggins.
Meanwhile, the Great Goblin reveals to the dwarves that Azog, an Orc war-chief who killed Thrór and lost his forearm to Thorin in battle outside the Dwarven kingdom of Moria, has placed a bounty on Thorin's head. Gandalf arrives and leads the dwarves in an escape, killing the Great Goblin. Bilbo exits the mountain and rejoins the company, keeping his newly obtained ring secret. The company is ambushed by Azog and his hunting party, and takes refuge in trees. Thorin charges at Azog, who overpowers and severely injures him with his Warg. Bilbo saves Thorin from the Orcs just as the company is rescued by eagles. They escape to the safety of the Carrock where Gandalf revives Thorin, who renounces his previous disdain for Bilbo after being saved by him. They see the Lonely Mountain in the distance, where a thrush knocks an acorn against a stone, waking Smaug.
- 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, Ed, Edd, n Eddy, Anna, and Elsa guest star in this film.
- Ernie, the Dazzlings, Fifth Brother, Seventh Sister, and King Sombra will work for Azog in this film.
- The storyline continues in Little Bear meets The Hobbit: The Desolation of Smaug.