Even the Night King bows before the coolness of Beric Dondarrion and his flaming sword. That's the only explanation as to how he (and his best friend Tormund) survive The Wall's collapse. Seeing him alive and well in the season eight premiere of Game of Thrones made us rejoice. But it also made us wonder about the magic fueling his flaming sword all over again. After all, without his nifty weapon, the scene where he and Tormund search for Night's Watch survivors would be completely dark, and we can all agree the light source is much appreciated during that creepy sequence.
The show has never explicitly explained where Beric's sword gets its flames from, but a combination of the books and subtle details in the series give us a pretty good idea. Thanks to Thoros of Myr and his Lord of Light given abilities, the knight has been brought back to life six times. The constant resurrections have imbued him with a certain amount of power. He truly is a servant of the Lord of Light now, and according to A Song of Ice and Fire author George R.R. Martin, he's also something known as a Fire Wight. Basically, it's fire keeping him alive, just as ice seems to fuel traditional wights.
That's outside the show's canon, though (at least as far as we know). Within the show, the answer to what fuels his sword is unclear, but the Lord of Light seems like a safe bet. In the books, Beric cuts his hand on his blade in order to ignite the fire, making his cool sword the product of some kind of blood magic. But on the show he generally just grips it and BAM, it goes up in a blaze of glory. As party tricks go, that one's pretty excellent. It also fits into the character's mission statement. In season seven, Beric has a heart-to-heart with his brother in resurrection, Jon Snow, about what their purpose is. The way he sees it, their only job is to protect the living, and that's why they've been given more than one chance at life.
If Beric's strong sense of conviction is true, the idea that there's a fire existing within him isn't so far-fetched. He is a soldier in the Lord of Light's army, and he has a special gift as a result. And that gift comes in handy, especially when he has to face down White Walkers that can only be killed with Dragonglass or a nice toasty fire that he just happens to be able to summon at will.