Warning: Spoilers for Game of Thrones episode "The Long Night"
The Night King was finally killed in Game of Thrones season 8's Battle of Winterfell, but he wasn't killed by dragonfire. In the latest Game of Thrones episode, which has been titled "The Long Night", was full of incredible twists and heartbreaking deaths, and an end that no one could have expected, as Arya was the one to kill the Night King when all hope seemed lost. But why was it that the battle got to this point, when Daenerys and Team Winterfell had been so convinced that they could deal with the leader of the Army of the Dead with dragonfire?
"The Long Night" started with a shock, as the Dothraki (and their flaming swords) were completely destroyed by the Army of the Dead. The Team Winterfell battle plan quickly fell apart, as the Night King brought in a magical fog that stopped Jon and Dany from being able to do much with their dragons, the wights got past the fire trench, and of course, the dead in the crypts were brought back. However, one part of the plan did go as expected: the Night King was drawn out, and Daenerys was able to hit him with a blast of dragonfire. Except, of course, that it left the big bad without a scratch.
In retrospect, it shouldn't be too surprising that the Night King wasn't hurt by dragonfire. Not only did Bran say that he didn't know if dragonfire could hurt the first of the Walkers, but fans have actually seen him walk through fire in the past. Unlike most of the wights, who can be destroyed with fire, the Night King has repeatedly shown that no mere flame is going to take him down. In fact, he dealt with dragonfire when he killed Viserion, so Team Winterfell should have known that their plan to take him down with a dragon was not going to work.
One of the most popular theories about why the Night King was able to pass through the fire without a scratch is that he is actually a secret Targaryen. This would explain the spiraling symbol (that looks awfully like the Targaryen house sigil), his ability to ride a dragon (even an undead one), and his power to stroll through fire unharmed, just as Daenerys has done time and time again on the show. However, there are a few problems with this theory - primarily that we have seen the creation of the Night King by the Children of the Forest, and that happened long before the Targaryens left Old Valyria and came to Westeros. So unless he happened to be a rogue Targaryen who just so happened to be in Westeros at the time, it's highly unlikely that this is why he survived.
What's more likely is that the Night King's magic is so powerful - and so connected to the cold - that it is able to withstand fire. In this episode, it was shown that not only does the Night King have the ability to raise the dead (and it still hasn't been totally explained how), but the dragonglass in his heart also gives him the apparent ability to call down ice-fog, as well as a few other neat winter-themed tricks. It seems that the magic of the Children of the Forest that created him with dragonglass also left him with a few new powers - and it may be the dragonglass and ice magic alone that allowed the Night King to pass through the flames unscathed. This would also explain why he can only be killed by Valyrian steel - this fire magic is the only thing that can destroy the ice magic that the Night King possesses.
In some ways, this is a deeply unsatisfying ending for the big bad of the past seven seasons - it's still not clear who he was (beyond an early man who was changed by magic), or how he gained the magic that he has; it's all simply explained away with a wave of the hand and a nod to the magic of the Children of the Forest. The true explanation for exactly why dragonfire doesn't hurt him may never be revealed, although speculation about secret Targaryens and ice/fire magic will continue to swirl around him for the next three episodes - as the threat changes from being the Night King to Cersei Lannister, and potentially to Jon and Daenerys at odds for the Iron Throne.