The last time I had a character die, it definitely was the DM's fault. He had found an online conversion of a powerful Earthdawn enemy, a Wormskull Horror. The fight had two phases- the monster's human disguise and some minions (not Minions, though it was a 4e game).
It was rough, but then the monster assumed it's true form, basically getting a whole new stat block (this led to a bit of contention as I had a sword that prevented enemies from healing that had never come up- but the DM insisted it wasn't healing, but gaining a whole new pool of hit points. Bah, lol).
4e was designed with the idea you really should get a 5 minute rest between encounters, but since that "wasn't logical", we had to continue without the encounter powers we had use. The creature had some bizarre abilities as well, like being able to counter the use of an at-will power, and steal our Action Points if we attempted to use them.
Now the idea was for us to run, but the DM overplayed his hand- the creature marked us with a curse that allowed it to, for a year and a day, not only scry on us, but use our some of it's powers (including said curse) as an emanation point for it's powers.
Thus, it could continue to harass us anywhere we went, and worse, made us a threat to anyone else we came near. With this information, I concluded we really had no choice- we kill the thing now, or else.
The battle went poorly, especially when the monster Dominated our Sorcerer into attacking our Ranger (critical hit, of course. I don't know why, but any time players are forced to attack each other, a crit seems inevitable), taking him out. Finally it was my Blackguard vs. the creature, one on one. I had high defenses, so it was taking it awhile to kill me, and all I could do was keep attacking it. My character was barely up, and I got a critical hit.
"This", I said to myself "would be the perfect way to salvage the encounter, by saying the monster falls". But no, the DM said it was still up, and it killed me.
Dead silence at the table. "I guess that's that, then." I finally said, and packed my books.
The DM had decided his great NPC nemesis and his storyline was more important than the PC's. I know some people would say "yes, exactly, that's what should happen", but the combination of putting us up against impossible odds, giving us no real way out that we could see, and grinding our characters to dust really sucked all the fun out of it.
Sure, we could make new characters and try again, but everything we'd worked for in the campaign, for months, had just been undone, so all the momentum was sucked out of the proceedings. Looking back, it felt like the DM resented us for our success.
A few months later, we gave him a second chance, but it was unfortunately more of the same. Allies we made turned against us, if we managed to pull off something he didn't account for, he would ad hoc rule that it didn't go down that way, saving his NPC's time and again (for example, we were on a moving lightning train, and we managed to push a monster out of a window. He failed the save to avoid the forced movement, looked at the die and said, "well that's a lame way to end the encounter, so it doesn't work").
It really came down to the fact that the guy felt intimidated because some of us had been playing D&D longer than he'd been alive, and didn't want to admit when he'd made a mistake, which would have been fine- mistakes happen, we can move on. Instead, he was perfectly fine with running our PC's ragged until a TPK was inevitable.