The film opens with Desna, a fourteen-year-old Waterbender girl, and her brother the sixteen-year-old Akiak, find Long and Oogi in an iceberg. After Long is revealed to be "The One", the three travel to the Northern Water Tribe so that Long and Desna can learn Waterbending. En route, Long and friends visit the Southern Air Temple, where Long discovers the genocide of his people, after which he finds the last winged lemur of the air temples, Foo foo. Throughout their journey, the trio are pursued by Prince Kazan, the exiled son of Fire Lord Kenjin, who seeks to reclaim his honor by capturing "The One". Kazan travels with his uncle Mako, a legendary Fire Nation general and the older brother of Kenjin.
After leaving the Northern Water Tribe, Long masters Waterbending under Desna's tutelage. Searching for an Earthbending teacher, the group meets Chen, a twelve-year-old blind Earthbending prodigy, and recruit her as such. Kazan and Mako, now fugitives from the Fire Nation, attempt to lead new lives in the Earth Kingdom, where Kazan, with the help of his uncle, tries to let go of his troubled past and his obsession with capturing "The One". Koko Iwanshiro, the head of Nanjing's secret police, the Dai Li instigated a revolution, allowing the Fire Nation to capture Nanjing. Both Kazan and Desna are captured during the coup, and though Desna offers him redemption, Kazan sides with his sister. Long attempts to activate the Spirit State, an act he had formerly avoided because it requires him to let go of his deep romantic love for Desna, but Koko hits him with lightning as he powers up, killing him and removing the Spirit from the plane of existence. Mako, very disappointed and sad in Kazan's choices, intercedes, allowing Desna to escape with Long; she is able to revive him, but he can no longer re-enter the Spirit State, depriving him of one of his strongest and most powerful weapons just as Nanjing, the strongest bulwark against Fire Nation conquest, has fallen.
Long recovers from his coma to find his allies disguised as Fire Nation soldiers on a Fire Nation ship (Long also finds himself possessing a new head of hair), while Kazan has been restored to the position of crown prince and Mako is imprisoned as a traitor. Akiak has planned a small-scale invasion of the Fire Nation to defeat Fire Lord, taking advantage of the solar eclipse, staged by various allies encountered in previous episodes. After initial success, the invasion ultimately fails, and only Long, Akiak, Desna, Chen, and a few others escape. Kazan, now in a change of heart, defies his father and decides to teach Long Firebending; though it takes a while to make up for a year's worth of dogged pursuit, he eventually manages to prove his change of heart and is adopted wholeheartedly into the Long's party.
Long and his friends confront Fire Lord Kenjin, who plans to use the tremendous power and energy of the Great Comet to destroy the other nations and rule the world as the Phoenix King. Mako, after breaking himself out of prison, leads the Order of the White Lotus (an international society of martial-arts masters to liberate Nanjing. Akiak and Chen disable the Fire Nation's airships, preventing them from burning down the Kingdom. Long, after an intense fight with Kenjin, falls into the 'Spirit State' and defeats the fire lord. Long is reluctant to kill him, and is able to overcome him by permanently stripping him of his Firebending with an ability called "Energybending". Kazan is crowned the new Fire Lord and, with the help of Long and his friends, begins rebuilding the three nations. After Kazan is crowned, he goes to confront his father in prison and demands the location of his banished mother. The team meets at Mako's tea shop in Nanjing to celebrate their victory.