Five years after the Viking village of Berk has made peace with the dragons, dragons now live amongst the villagers as working animals and companions, and even take part in racing sport. Hiccup goes on adventures with his dragon, Toothless, as theydiscover and map unexplored lands and territories. Having come of age, he is being pressed by his father, Stoick the Vast, to succeed him as chieftain, although Hiccup remains unsure if he is ready for this responsibility.
While investigating a wildfire, Hiccup and Astrid discover the remains of a fort encased in a colossal ice formation and encounter a dragon trapper named Eret, who blames them for the destruction of his fort and attempts to capture their dragons for an insane conqueror called Drago Bludvist. The two riders return to Berk to warn Stoick about the dragon army that Drago is amassing, and Stoick orders the villagers to fortify the island and prepare for battle. Against Stoick's orders, Hiccup flies off with Astrid and they surrender themselves and their dragons to Eret so as to be taken to Drago in order to reason with him. However, Stoick, Gobber, and Berk's other dragon riders pursue and find them.
Stoick explains that he once met Drago and found him to be an unreasonable madman, but Hiccup refuses to believe that war is inevitable and flies off with Toothless. They are captured by a dragon rider named Valka, who is revealed to be Hiccup's long lost mother. She explains that she spent twenty years rescuing dragons from Drago's traps and bringing them to an island haven created out of ice by a colossal Alpha dragon called a Bewilderbeast, to whom all dragons answer. Stoick tracks Hiccup to the island where he discovers that his wife is still alive. Simultaneously, Astrid and the other riders kidnap Eret to find Drago, but they are also captured and Drago learns of Berk's dragons.
Drago and his army lay siege to Valka's sanctuary, where he reveals that he has his own Bewilderbeast to challenge the Alpha. A titanic battle ensues between the two Bewilderbeasts in a fight for control over all dragons on the island. Drago's Bewilderbeast emerges victorious and seizes control of all the dragons, including Toothless. Hiccup tries to persuade Drago to end the violence, but Drago orders him killed as well. Toothless, under the influence of the new Alpha, approaches Hiccup and fires a plasma blast. At the last instant, Stoick pushes Hiccup out of the way, and is hit instead, killing him instantly. Drago leaves Hiccup to his fate and, riding Toothless, leads his now larger army to destroy Berk. Stoick is given a ship burial and Hiccup, now filled with regret at the loss of his father, decides that he will fly back to Berk to defend his people and live up to his father's legacy.
The dragon riders ride baby dragons, which are immune to the Bewilderbeast's control, and arrive at Berk after the Alpha had already attacked the village and taken control of the dragons there. Hiccup confronts Drago and a brainwashed Toothless while the other riders work to distract the Bewilderbeast. Drago again orders Toothless to kill Hiccup, but Hiccup succeeds in disenchanting Toothless. Drago then orders the Alpha to shoot the pair, and the Bewilderbeast successfully encases them in a large blast of ice, seemingly killing them. His victory is short-lived, as Toothless, now glowing with plasma, blasts away the ice, revealing that both he and Hiccup are unharmed. Toothless challenges the Alpha and repeatedly fires plasma blasts at the Bewilderbeast. This frees the other dragons from the Bewilderbeast's control and all fire at it, severely injuring the colossal dragon until Toothless fires a final massive blast, breaking its left tusk.
Defeated, Drago and his Bewilderbeast retreat into the ocean as the villagers celebrate their victory. All the dragons acknowledge Toothless as the new Alpha dragon, and Hiccup is made chief of Berk by the village elder. The film ends with Berk being rebuilt with a statue of Stoick erected in his honor, and Hiccup doing his duties as chief, proudly declaring that while others may have armies and armadas, Berk has its own dragons.