In my years of DMing I've been derailed countless times, but this takes the cake.
The party -a dragonborn rogue, human paladin, tabaxi gunslinger, and a high elf blood hunter named Isra- were prisoners trapped in the tower of an orc stronghold that had been taken by drow. After a wonderfully vulgar exchange between the rogue and the priestess of Lolth they were left to their own devices. A few failed attempts thanks to some bad dice rolls they were at a loss.
You see the BBEG still had plans for the party, so them rotting away in a tower like some fairy tale princesses was no good. He sent Vermoth, a loyal djinni under his command, to give them a helping hand. He didn't unlock the doors though. No, that would be too easy. Instead Vermoth opened up the outer wall of the tower, and gave them some rope. A few athletic checks later and the party had climbed into a lower floor. Bruised, but at least still alive.
The party managed to find their equipment, and the rogue suggested something unholy. They had found a Deck of Many Things a few sessions before, and he convinced them they needed to draw.
The first few cards went alright. A keep to claim, some jewels. Then the gunslinger decided to draw two. Skull, and The Void.
His soul was whisked away deep into the Underdark, sealed in a crystal guarded by a great black dragon and watched by the Skull's Avatar of Death awaiting the day it would be free to claim for itself.
The party already had way too much on their plate and I was admittedly getting a bit frustrated at the situation, so I decided to make fixing things as short and sweet as possible rather than face the consequences.
Vermoth, again at the behest of BBEG, showed them where to find their lost companion's soul once they escaped the stronghold. The journey was quick and easy, and they found the crystal. The black dragon was sleeping in a shallow pool of strange fluid, and just to be as clear as possible I had it open an eye, look right at the players, and go back to sleep. It wasn't in the mood for hunting, and didn't care about the gunslinger's soul. They freed the gunslinger, and he began fighting the Avatar of Death so we could put this whole situation behind us. Yeah it was badly handled I'll admit, but we all wanted to get back on track.
All of us except Isra the blood hunter.
Now Isra was a good old fashioned murder hobo, but she had managed to rein it in just enough to not ruin everyone else's fun so we never had a problem with it. Until that day.
Isra's player looked at me, "Is the pool flammable?"
I knew where this was going, "Oh gods. Roll perception."
She rolled high.
"You're not entirely sure, but if it's what you think it is it's highly combustible."
The rest of the party caught on to what was about to happen.
"Don't do it," the paladin warned, getting closer to Isra.
"I swear to Bahamut, Isra!" the rogue braced to take cover.
The gunslinger was too distracted to catch on.
"I cast firebolt on the pool!"
"No!" everyone yelled, but it was too late. The whole cavern erupted. The gunslinger and the avatar failed their saving throws and go down right there. Isra, the paladin, and the rogue passed. The rogue used Evasion and took no damage while the other still had pretty hefty chunks taken out of their HP.
The dragon, more angry than hurt, stood and glared daggers at Isra.
Initiative was rolled, and the dragon launched an onslaught on Isra, taking both her and the paladin down. The rogue knew he couldn't face a full grown dragon alone, so he tried to plead for forgiveness from it so he could save his friends.
"The dragon is way too enraged to listen to what you have to say."
On his next turn the rogue bolted down a narrow passage, saving himself.I Ittook a minute for everyone to process what had happened, and we ultimately continued the campaign with a few fresh characters. New companions for the rogue who barely escsped dragonfire.
Now I use this story as a cautionary tale for new DMs and Players alike. For DMs it's always be on your toes, because you'll never know what a Player will do. For Players its beware the temptation of becoming a murderhobo lest you end of like Isra, the aspiring dragonslayer.