Source plot synopsis — includes the ending
While investigating a burnt forest, Hiccup and his girlfriend Astrid are ambushed by dragon trappers led by Eret, who works for Drago Bludvist, a warlord who plots to enslave all dragons into becoming soldiers. Hiccup and Astrid escape to Berk and warn Stoick about Drago. As Stoick fortifies Berk to prepare for battle, he explains that he once met Drago at a chieftain gathering, where Drago offered them protection from dragons if they pledged to serve him; upon denying him, he had his dragons attack them, leaving Stoick as the sole survivor.
Hiccup refuses to accept that war is inevitable and flies off with Toothless in search of Drago to change his mind. Instead, they encounter a mysterious dragon rider, who is revealed to be Hiccup's mother, Valka, who was presumed dead after being taken away by a dragon during a raid. Valka explains that, like her son, she could not bring herself to slay dragons; instead, she rescues them from Drago and brings them to an island nest formed out of ice by a massive, ice-breathing alpha dragon called a Bewilderbeast, which can control smaller dragons by emitting hypnotic sound waves. Stoick and his companion Gobber track Hiccup to the nest, where Stoick discovers that Valka is alive, and they finally reunite. Meanwhile, Astrid and the other riders force Eret to lead them to Drago, who captures them. Upon learning of Berk's dragons, Drago directs his armada to attack the dragon nest. He also tries to execute Eret, but Astrid's dragon, Stormfly, saves him, prompting Eret to help the others escape.
A battle rages at the nest between dragon riders, Valka's dragons, and Drago's armada. Drago unveils his own Bewilderbeast to confront the alpha, killing it and becoming the new Alpha, thus controlling all dragons. Hiccup urges Drago to cease the violence, but he refuses, citing his family's deaths from dragon attacks in his childhood and his desire to conquer the world. His Bewilderbeast hypnotizes Toothless and forces him to kill Hiccup, but Stoick sacrifices himself by taking the fatal blast instead, and Hiccup drives Toothless away out of grief. The group is stranded as Drago takes control of their dragons and rides Toothless to conquer Berk. After the group holds a Viking funeral for Stoick, Hiccup feels lost without his father and his dragon, where Valka reminds him that his father believed he could unite humans and dragons. Inspired, Hiccup and his allies return to Berk on baby dragons, immune to the Bewilderbeast's influence.
Back at Berk, they find that Drago has attacked the village and taken control of the dragons. Hiccup frees Toothless from the Bewilderbeast's control and confronts Drago before the Bewilderbeast encases them in ice, from which Toothless shields Hiccup. However, Toothless blasts away the ice and enters a glowing, super-powered dominant state, making him immune to the Bewilderbeast's control. Toothless challenges the Bewilderbeast while repeatedly shooting at it, breaking its control over the other dragons to side with him. The freed dragons fire at the Bewilderbeast until Toothless fires a massive blast, breaking its left tusk. Defeated, the Bewilderbeast retreats to the sea with Drago.
The Vikings and dragons celebrate their victory. Hiccup is officially made chieftain of Berk, Valka decides to stay with her son, and the dragons accept Toothless as the new alpha. Berk undergoes repairs, and Hiccup feels confident that they will defend their way of life.
Sources and content license
Source and revision history ↗ · Adapted from Wikipedia contributors, How to Train Your Dragon 2. Section headings and formatting adjusted. · Content license