Happens at least twice in Fist of the North Star, and used as a Tear Jerker both times. Shuu dies after being forced to complete Souther's pyramid to protect his village, and Fudoh's heroic final stand against Raoh.
"My body may die; I may be reduced to but a single drop of blood. But those with Kenshiro's courage will rise time and again to face you; while you, Raoh, will live for the rest of your life but a mere terrified coward!!"
Also happens in Basilisk, where Oboro can only free herself from her role as an Unwitting Pawn by killing herself rather than her major rival and love interest.
Franz from Gankutsuou, who secretly takes Albert's place in the duel with the Count. He knows very well that it's impossible for him to win, but he still goes through with it, and tries his hardest to fight. He dies a very painful and bloody death.
However, Franz's "moral victory" is in some ways a literal one, as he not only succeeds in convincing Albert not to hate the Count for his actions, but a fragment of his sword, which got lodged in the Count's chest actually kills the Count later when he ceases to be Gankutsuou and becomes vulnerable again.
A non-death example: In Peanuts Charlie Brown will always go after that football. He knows he will fail, and so does the audience. In 50 years, he has never kicked that football, going through every trope of failure under the sun. Yet still he tries. In the end, he is the one the audience roots for, because the alternative is just giving up and not trying at all.
Another non-death example: Calvin frames his alter-ego Stupendous Man as one to cover for the fact that if it weren't for his moral victories, he'd never achieve any at all.
Spartacus is the classic example. He is a slave who becomes the leader of a slave uprising against the Roman Empire. After a string of stunning victories, they're finally utterly defeated and he and his rebels are crucified along the road to Rome. Historically, Spartacus had the chance to quit while he was ahead and escape to freedom, but was trapped into continuing confrontations by the blood lust of his army — making this one even more tragic, as well as Older Than Feudalism.
His whole army become martyrs when they refuse to give him up to the authorities in exchange for their lives, "I'm Spartacus!"
The title character in Gladiator becomes a darling of the public, kills the emperor in a duel and dies afterward.
He was already mortally wounded by the Emperor just before they entered the arena. It was meant to be more of a fancy execution than a duel, in order to discredit the hero and bolster the strength of the Emperor. The evil Emperor still loses.
William Wallace of the movie Braveheart builds an army to drive the English garrison out, gets betrayed, captured, refuses to bow before the king, and is tortured and killed. Then his army wins a decisive battle.
In Robin Hood: Prince of Thieves, Robin Hood's father Lord Locksley charges out of his castle and attacks the Sheriff of Nottingham's men, dying in the process. This motivates Robin to oppose the Sheriff.
The anarchist being sent to the gulag delivers an impassioned speech to the passengers on the train in Doctor Zhivago that they are the real slaves and he is the only free man on the train.
V for Vendetta, though in this case, deliberately set up in a massive gambit by the title character. Probably from the very beginning.
Also, the girl with the glasses who is killed by a fingerman.
And, for that matter Valerie. Her refusal to give in even as she's tortured, experimented upon, and eventually killed by Norsefire — for no greater crime than being lesbian — is one of the major motivations for V, and later for Evey. V wouldn't have become the intentional Doomed Moral Victor he became if she hadn't become one without even trying.
One could make this argument for Leonidas and the Spartans of 300, railing against the inevitable conquest of a gigantic army that proves not so inevitable after all. But not until after they've died to a man proving it.
In fact, the historical Leonidas was told by the oracle that the only way to save Sparta was for him to die in combat, causing him to deliberately invoke the trope.
Not entirely a subversion. He escapes to the freedom of his own mind where they cannot touch him. There's something sadly heroic about it all.
Still a subversion: Sam's dream sequences severely degenerate over the course of the film. In the first sequence, he is the Knight in Shining Armor saving the distressed damsel in a surreal landscape; by the last, he has become the damsel, inert and passive, being taken to a decidedly ordinary ending. The machine has destroyed his desire to be anything more than he is, even in his dreams. The heroism is lost; only the sadness remains.
One Flew Over the Cuckoo's Nest, as the death of Billy inspires McMurphy to attack Nurse Ratched, and the lobotomy of McMurphy inspires the Chief to escape, and one assumes the others escaped through the hole in the window as well, though that isn't shown.
More so in the book, where McMurphy's attack on Ratched gets him lobotomized, as in the film, but we're explicitly told that one by one the other named patients have checked out. The Chief is just the last one to go.
Parodied in Monty Python's Life of Brian, where instead of the PFJ coming to rescue Brian from the cross, they leave him up there precisely for this trope, much to his dismay.
"Executed for treason by Nazi Germany = National hero in modern Germany".
Completely subverted in 1984, where the protagonists think their struggle will end like this, but they are both broken and changed by the Party instead, making it a case of Shoot the Shaggy Dog.
Well, not completely subverted. They still count as the Moral Victors, only that their will has been destroyed by endless torture. Are they any less heroic for trying to resist the Party by being human in the first place?
"Repent, Harlequin!" Said the Ticktockman is a story much like 1984, where Harlequin is captured, broken and changed in the end. Despite this, he still wins something as his actions have an effect.
Parodied in the book Night Watch, where rebels (somewhat based upon La Résistance in Les Misérables) use as their slogan something like "you may kill us, but you'll never take our freedom", which Pratchett notes that the villains consider the stupidest slogan they've ever heard. Ultimately, the book does present the rebels as a somewhat straight example of doomed moral victors, given that the evil ruler is assassinated and his forces are defeated, but this is tempered by the fact that his seemingly benevolent successor ends up being even worse. The entire fight is pointless anyway, the plot to assassinate Lord Winder was around since before La Résistance and occurs identically in both time lines, despite the pivotal (and only) battle going the opposite way.
Invoked by Twoflower's daughters in Interesting Times when it becomes evident that their rebellion has failed. Rincewind, a hardcore cynic and self-proclaimed Dirty Cowardpromptly explodes in anger at their acceptance of this, angrily telling them that there is no such thing as a cause worth dying for, as a person can pick up five causes on any street corner, but only has one life. The aghast girls ask how Rincewind can live with such a philosophy — Rincewind's answer is a bitter, vehement "Continuously!"
The book features a running gag of bit characters defiantly telling Cohen they would "Rather die!" than betray their Emperor. So then Cohen kills them, mistaking their bluster for this trope. Eventually the other characters start cautioning everyone that they make sure they're feeling very, very sincere about such comments before they say them.
Pretty much every named character in Brave New World. They end up banished to islands.
Due to the Values Dissonance between the 17th and 20th centuries, Don Quixote is now seen as one of these. This is especially true in The MusicalMan of La Mancha with its song "Dream the Impossible Dream".
The fourth book of Jerry Pournelle's War World anthology series has a short story by S. M. Stirling called "Kings Who Die", in which a scholar/soldier-turned-bandit-refugee-turned-tribal-founder deliberately invokes this trope when he martyrs himself fighting a vastly superior foe in single combat; he chooses to become a legend to inspire his newly-established society.
And Stirling uses the trope again at the end of A Meeting In Corvallis.
Played with in The Red and the Black as the reader is meant to see the Anti-Hero as this when he is able to happily go to the guillotine after finally renouncing his Holier Than Thou persona and religion in general, and being authentic for the first time, despite the fact that society as a whole likely views him as scum.
Likewise, the death of Meursault in The Stranger, which was inspired by the above.
Various other officers are also examples. Chen Gong refused Cao Cao's pardon because he felt Cao was too evil to serve and was executed instead. The physician Ji Ping dies without ratting out his confederates in a plot to assassinate Cao Cao, despite Cao's best efforts to get him to confess. One of Liu Zhang's officers commits suicide at Liu Zhang's feet when his warning about Liu Bei is ignored.
In Roger Zelazny's short story The Keys to December, the main character's people are terraforming a world to fit them, since the only world they could live on was destroyed. The native lifeforms, under the new evolutionary pressure, evolve sentience and religion (worshiping the main character as he awakes every 250 years and patrols the world to see how the terraforming is going). He realizes that they cannot evolve further and, after failing to convince his people to stop or slow the terraforming, leads his believers in a rebellion. Finally, he and his main rival agree to put the question to a vote of their people—as the main character says, if he loses, "I'll retire and you can be God." He loses, and lives out his life as the God of the presumably now-doomed people.
Les Misérables is probably one of the older uses of this trope - the Friends of the ABC are courageous and noble and ultimately, in spite of their barricade and all their preparations, totally helpless against the forces of the government.
Made explicit in the musical: "Let others rise to take our place until the earth is free!"
Mistborn has a couple of cases. First the Skaa rebellion, which is purposefully trying to invoke this trope to inspire the masses to revolt, and second, Kelsier who was also intentionally invoking this trope, but had a better plan for it.
Somewhat subverted, given that Kelsier's plan to overthrow the empire actually succeeds
Except that the plan doesn't succeed because of Kelsier's actions, because Kelsier vastly underestimated the power the Lord Ruler wielded. While he accepted the Lord Ruler was powerful enough to kill him (which is what he planned), he didn't realise (because the Lord Ruler had kept the true extent of his powers a secret) that The Lord Ruler was somewhat justified in claiming to be a God - the Skaa rebellion didn't faze him because if he wanted to, he could kill all of them without any difficulty. It only succeeds because Vin realises his one weakness (ironically through the use of a metal which Kelsier had told them, lying, was the secret to beating the Lord Ruler, in order to give them hope) and exploits it to kill him.
Not played exactly straight in The Wheel of Time, but Rand, once he goes full-blown Jerkass Mode, throws former allies and even his best friends into battles, not because they've actually got a shot, but because they pulled it out of their ass before and he's hoping they can do it again.
Albus Dumbledore, from the Harry Potter novels, died a Doomed Moral Victor because, in the end, his death was All According to Plan. By choosing the time and means of his death, he denied LordVoldemort mastery of the Elder Wand, something that was key to the villain's ultimate demise. Additionally, by committing "Suicide by Snape", Dumbledore succeeded in one of his secondary goals: keeping Draco Malfoy from crossing the Moral Event Horizon into true villainy, and putting the young Slytherin on the eventual path of redemption.
Mme. Raquin in Thérèse Raquin watches Thérèse and Laurent die and gets satisfaction that her son is avenged. However, the ending is ambiguous as to her fate. The implication is she died not long after, but even if she didn't her paralyzed and silent state means that she is completely dependent and will die unless someone finds her.
Considering that the group manages to take out more than two thirds of the Federation's military forces, allow for several other human powers to expand, and begin a full scale (though now leaderless) rebellion by uniting various warlords; it's easy to see why.
Legate Damar in Star Trek: Deep Space Nine. He begins the military rebellion, inspires the grassroots civilian uprising even after his forces are crushed and defeated, but dies in the final battle to free their homeworld.
A somewhat less dire and literal version happens in the episode "Take Me Out To The Holosuite", during which the station home team (called "The Niners") gets absolutely creamed by the visiting Logicians, an all Vulcan team. Vulcans have vastly superior strength and speed to most other humanoid species, and it is implied that they've been training for quite a while just to beat whatever team Captain Sisko could pull together on short notice. In the end, the Niners only manage to score a single run against the Logicians' eleven, but they have fun doing it.
In the recent BBC series Robin Hood Robin gets this at the end of Season Three.
It also happens to Marian the the end of the second season. She finally stands up to Guy and admits to him (and herself) that she's in love with Robin. Guy then runs her through with his sword.
Invoked in Community episode "Beginner Pottery" when Shirley becomes one when she captains her ship into a "storm" in order to save Pierce, stating she would rather be nice than strong. Her reward: becoming an admiral, at least in the eyes of the professor.
From Lexx, Kai and the other Brunnen-G who chose to stand up to His Divine Shadow when the rest of their race decided to simply wait for death. The famous (among fans) "Brunnen-G Fight Song" is all about this trope and facing death as a Warrior Poet; it is traditionally sung when headed into a hopeless battle that must be fought anyway. Translated lyrics: Fighters to the fight/ For our home and for our hearts/ We will fight and die/ Forever Brunnen-G
As a mockery of both their spirit and the prophecy which stated the last of their race would defeat him, His Divine Shadow, turned Kai into his personal undead assassin. Bit him in his Genre Blind ass a few thousand years later.
In the music video for My Chemical Romance's "SING", all of the heroes, or Killjoys, as they are known in the story, are shot by either the main antagonist, Korse, or his army of Draculoids, save for the youngest of the group, played by Grace Clark.
Religion & Mythology
There's Prometheus, whose opponents are the Greek gods; they are not exactly villains, but certainly powerful and unforgiving foes to have.
Arguable, since Prometheus is later freed by Hercules and the gods eventually just leave him alone.
You spend a few generations getting your liver pecked out by an eagle on a daily basis just for giving Man the ability to cook meat and keep warm - I think he qualifies
Norse Mythology before Christians influenced it, when There Was Nothing After Death and evil won in the end. Of course, it's not quite all there since there is nobody left to fight after Ragnarok. In later versions, it's played straight when the new world is reborn.
In several countries memories of historical defeats are treasured more in folklore then historical victories.
Games Workshop's Warhammer 40,000 event The Fall of Medusa V was a world-wide tournament effort. Various official tournament results were submitted, and the results would be aggregated and used to determine the fate of the planet Medusa V. There were several Space Marine armies participating (as expected for Games Workshop's iconic flagship army) but many of these armies lost, dragging their overall average well below many other factions participating (it could be speculated that as a popular starter army they had a per portion higher number of inexperienced players participating.) As these losses would seriously undermine the image of the face of their entire brand, Games Workshop declared that though they had lost most of the land battles, the Space Marines had won a "moral victory" by succeeding at most of the space battles (which were not part of the calculation from the player base anyway.) Understandably, several players of the other factions which did succeed were a bit sore about this.
Pulled off well in Final Fantasy VII: Crisis Core. Zack Fair dies in a heroic Last Stand against the corporate army that has been hunting him down like a dog, and while he doesn't even come close to achieving his goals, his death empowers the guy who eventually overthrows Shinra.
Zack: Boy oh boy. The price of freedom is steep...
Zack, of course, had no intention of overthrowing Shinra. All he was trying to do was protect his comatose friend and earn their freedom. When he inevitably fails (seriously, how can you go up against an army and win? But then, he knew that...), he still wins, because his actions saved Cloud's life and gave him a future. Everyone else might forget Zack, his entire history might be erased by Shinra, but Cloud will remember him. And that's all he ever wanted: proof of his existence, proof that he had a dream. His life was brief and sad, but he lived.
Ramza of Final Fantasy Tactics who, despite those who would pervert the idea of righteousness persecuting him more and more, constantly struggles against the evils of his world. His refusal to resort to the sort of tactics Delita employs in such a world makes it all too obvious as to where this path will lead him; Ramza is aware of this, and will not change his course.
Zalbaag is probably a better example. Depending on how you view the ending, Ramza might never really qualify as doomed. Zalbaag dies specifically trying to do what is right. The only reason he doesn't do so sooner in the plot is because Ramza's accusations are unbelievable because of others' ploys. As soon as he finds evidence proving them, he fights and dies for it. Ramza doesn't do so.
Wiegraf and his rebellion are this. Even their name (the Corpse Brigade) even refers to the fact they know they are going to die, but they fight because they feel they are morally in the right against the corrupt aristocracy.
Orran Durai writes an account of Ramza's life that not only reveals the latter's innocence, but also the underlying political corruption of Ivalice. And he is burned at the stake for it. But eventually the account is published by his descendant, bettering the nation and making Orran's death at least somewhat worthwhile.
Gorath from Betrayal at Krondor becomes a shining example of cooperation and friendship with humans as well as acting at personal expense for the good of your people, and favoring mercy over a thirst for vengeance. That last one dooms him - he chooses to spare his Arch-Enemy Delekhan and shortly dies stopping him from activating the Lifestone. Unfortunately, the top-secret circumstances and the discontinued nature of that plot line prevent him from influencing his people or his friends in the martyr fashion typical of this trope.
Captain Brenner/O'Brian, The Obi-Wan ofAdvance Wars: Days of Ruin/Dark Conflict. Although he dies, his army unit carries on in his name and The Hero eventually wins.
The Hyrulean soldiers who are cut down by the invading Zant and his Twilit monsters, in the explanatory cut scenes of The Legend of Zelda: Twilight Princess. The massacre is stopped only by Princess Zelda surrendering to spare their lives.
The apprentice/Starkiller/Galen Marek from The Force Unleashed eventually becomes this, when he becomes the mask, embraces the new Rebellion, and is then killed and made into a martyr for the Rebel cause.
One of your choices at the end of the dystopian IF game Kagedcan have this effect. You end up in a stadium, facing the Inquisitor. You can either accept his "heads, life sentence, tails you die" offer, or leap at him with your hands around his neck. If you do the latter, snipers among the crowd in the stadium kill you, but it's hinted that the Inquisitor dies and you inspire the rebellion.
The obscure, semi-canonical (Bradbury was on the dev team), text-adventure sequel to Fahrenheit451. Guy manages to break into the Library and find Clarisse (who apparently faked her death at the end of the book), who has stolen a monumental stash of microcassettes containing the contents of the New York Public Library. They lock themselves in a transmitter room long enough to upload the cassettes' content to the Undreground's archives all over the world. They finish their upload, but don't have time to escape when the Firemen bust in and immolate
This is one way to look at Mass Effect 3's Refusal ending. Shepard, either unwilling to believe the Catalyst about the Crucible's abilities or not wanting to use the Crucible's powers for one moral reason or another, chooses to denounce the Reaper AI and take their chances at defeating the Reaper's in a conventional fight, stating that if they die, they will "die free". It doesn't work out for them or current galactic civilization. It does, however, give the next galactic cycle the chance to defeat the Reapers.
Satoko in Higurashi no Naku Koro ni's Meakashi arc is brutally killed via stabbing by Shion proclaiming that she will neither cry nor beg for her brother to save her. And she doesn't. It's enough to make Shion realize what horrible things they've been doing. In a manner of speaking.
This is the crux of Heroic Spirit Emiya aka Archer's character in Fate/stay night. In life he spent himself relentlessly pursuing the highest moral choices; saving as many people as possible on either side of a conflict without regard for his own feelings or situation. His reward was dying tired and alone on a hill of swords. He was actually okay with this until he went to the Throne of Heroes after death, and was tasked with protecting humanity from itself by slaughtering humans whose actions would lead to humanity's self-destruction. In the face of humanity's self-destructive nature, he came to hate humanity and his own ideals.
In the Fans!! alternate-universe story The Iron Easel, Will's counterpart is executed, but his last words are the beginning of the end for the Nazi regime.
TRON: Uprising: We know from seeing the Crapsack World that is TRON: Legacy that Beck's rebellion doesn't do squat against Clu, that Big Good Tron is Reforged into a Minion, and that even their equivalent of God is a broken coward beaten back into exile. The series "cheerfully" reminds us of this by making the latter half of it a study in Cerebus Syndrome, with torture, Mind Rape, and killing off several of Beck's allies. The season (series?) finale? Clu sends in a massive invasion fleet to level Argon City and the rebels with it.