The Hobbit: An Unexpected Journey is a 2012 epic high fantasy adventure film directed by Peter Jackson. It is the first instalment in a three-part film adaptation based on J. R. R. Tolkien’s 1937 novel The Hobbit. It is followed by The Desolation of Smaug (2013) and The Battle of the Five Armies (2014), and together, they act as a prequel to Jackson's The Lord of the Rings film trilogy. The film's screenplay was written by Jackson, his longtime collaborators Fran Walsh and Philippa Boyens, and Guillermo del Toro, who was originally chosen to direct the film before leaving the project in 2010.
The story is set in Middle-earth sixty years before the main events of The Lord of the Rings, and portions of the film are adapted from the appendices to Tolkien's The Return of the King. An Unexpected Journey tells the tale of Bilbo Baggins (Martin Freeman), who is convinced by the wizard Gandalf (Ian McKellen) to accompany thirteen Dwarves, led by Thorin Oakenshield (Richard Armitage), on a quest to reclaim the Lonely Mountain from the dragon Smaug. The ensemble cast also includes Ken Stott, Cate Blanchett, Ian Holm, Christopher Lee, Hugo Weaving, James Nesbitt, Elijah Wood, and Andy Serkis, and features Sylvester McCoy, Barry Humphries and Manu Bennett.
An Unexpected Journey premiered on 28 November 2012 in New Zealand and was released internationally on 12 December 2012, almost 9 years after the release of The Lord of the Rings: The Return of the King. The film grossed over $1.017 billion at the box office, surpassing both The Fellowship of the Ring and The Two Towers nominally, becoming the fourth highest-grossing film of 2012. Receiving mixed reviews from critics, the film was nominated for three Academy Awards for Best Visual Effects, Best Production Design, and Best Makeup and Hairstyling. It was also nominated for three British Academy Film Awards.
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 brought 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 drove the Dwarves out of their mountain and took 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 dinner 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. Bilbo races to join the company. Travelling onward, the company is captured by three Trolls. Bilbo stalls the Trolls from eating them until dawn, and Gandalf exposes the trolls to sunlight, turning them to stone. The company locates the Trolls' cave and finds treasure and Elven blades. Thorin and Gandalf each take an Elf-made blade, Orcrist and Glamdring, respectively; Gandalf also finds an Elven dagger, 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 hidden 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, which Radagast obtained from Dol Guldur as a sign that the Necromancer is linked to an eventual return of Sauron. 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 and challenges Azog, just as the company is rescued by eagles summoned by Gandalf. 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 sleeping dragon, Smaug, is awoken by a thrush knocking a snail against a stone.