The Operative: I believe in something greater than myself. A better world. A world without sin.
Capt. Malcolm Reynolds: So me and mine gotta lay down and die so you can live in your better world?
The Operative:I'm not going to live there. There's no place for me there, any more than there is for you. Malcolm... I'm a monster. What I do is evil. I have no illusions about it, but it must be done.
Zechs Marquise and maybe partially his 'friend', Treize Kushrenada, count in Gundam Wing. The former leaves Earth because he is a warrior, and nothing but this, and he has no place in the peaceful world he helped create. The latter is up for interpretation whether it is this trope or redemption for the evil acts he did to achieve his better world.
In Fullmetal Alchemist, Roy Mustang wants to overthrow President Fuhrer King Bradley and the military state, knowing fully that he, along with everyone who fought in Ishval, would be tried and likely executed for their unpardonable war crimes. In fact, he wants this to happen, feeling that is the only atonement for what he's done. Relax, it doesn't happen.
Code Geass is a very interesting case with Lelouch's Zero Requiem plan. This involves Lelouch taking up the Britannian throne as emperor and pulling a Zero Approval Gambit so that everyone in the entire direct their hatred towards him and staging his own assassination. Why does he do this? He wants to create an eternal peaceful world that will end all wars (particularly in regards to his younger sister). However, this involves sacrificing his own life since he cannot create his ideal peaceful world with people hating his guts. This is probably one of the main reasons why he entrusts his friend and rival Suzaku, as the identity of Zero; since he could create a better world under the guise of Zero without him.
A Certain Magical Index: In a ploy to destroy Touma, Othinus warps reality so the world is at a perfect state of peace and everyone is alive and happy, but Touma never existed. She tells him this perfect world has no room for heroes like him, and his presence will only introduce chaos and violence. Touma decides she is right, and attempts suicide. Fortunately, The Will of the Misaka Network, who has a Ripple-Effect-Proof Memory, stops him. She convinces him to not give up and to fight Othinus to get the world changed back. She points out that a real perfect world would have room for a hero like him.
A recurring theme in Batman: Batman's perfect world, one without crime, would have no need for the Caped Crusader.
Justice League actually went on to show this in the two-parter "A Better World" — the alternate Earth of the Justice Lords drove their Batman to build a trans-dimensional portal out of boredom, so the Justice Lords could cross over to an Earth that still had crime and help that world too. Well, that, or he was planning to betray the other Lords because he'd grown tired of their Knight Templar ways and wanted to see if another Batman could convince him that what he had been doing was wrong — Lord Batman was sort of mysterious like that. In either case, he's the only one of the Justice Lords who gets away in the end.
Similarly, in Infinite Crisis, one of the things that manages to convince Earth-Two Superman not to cooperate with what he believes is Alexander Luthor's plan to restore his "perfect" world is the current Superman's insistence that if he truly was Superman, then it couldn't have been a perfect world — "A perfect world doesn't need a Superman".
V from V for Vendetta (at least in the comic book version). One of the prominent themes of the comic was contrasting Evey's pacifism with V's use of violence to work for the greater good. At the end, V pulls a Taking You with Me, knowing that his violent ways would not fit in with the post-totalitarian order. He is replaced by Evey, the new "V", whose efforts are committed to creating things rather than destroying.
Demongoblin, an enemy of Spider-Man, fits this trope. He and the goblins of his dimension had a vision of their wickedness and the wickedness of others. They've all gone to other dimensions to cleanse them of sin (which means killing most-to-everyone). Each of them will return to the home dimension when he's done cleansing his. Then they'll all kill each other and the winner will commit suicide.
The comic Xombie after Derge, a zombie that still has his conscience, saves the human settlement, he rejects the idea of living among them.
In almost every version of the character, the last murderer The Punisher intends to kill will be himself.
Perhaps most famously of all, Ethan Edwards in The Searchers. At the end of the film the rest of his family are reunited while he stands alone in the doorway, unable to even enter their house, until he finally turns away.
Similarly, King David was not permitted to build God's temple because he was a man of war, despite the fact that these were wars that God basically ordered. So David's son Solomon built the Temple instead, and presided over a golden age of peace. The legend goes they even built the Temple without using any iron tools, because iron was used in swords.
Although not a villain, Bahzell's father Bahnak in the WarGod series is one of these. He's unique among his race, a largely barbaric people, for enforcing order, building infrastructure, educating his people, and generally trying to bring them up to the point where they can live in the civilized world again. Bahzell ruminates that although Bahnak is doing his best to unite his people and restore peace, he himself is such an ambitious warrior at heart that he could never be happy in the very world he seeks to create for his people.
The short story Not Fade Away by Spider Robinson is about a man. He is described as a muscular human being, and viewed as hideous by the narrator, containing such grotesque irregularities as an excess of musculature, primitive senses, and bilateral symmetry that leaves a blind-side. He's a Warrior, the last of his kind. Humanity grew, bonded, and merged with every other form of life. He and his fellows fought each other, with nothing else to do. They hoped, with the discovery of a Malign Bonding in another galaxy, to have an enemy... but they cured it. So now he is the last. And the narrator? An enemy. Actually the last of the Healers, healing, by killing (and dying with), the only being left in the universe who needs healing. Each is leaving a universe he no longer has a place in.
The Elric Saga's eponymous character, Elric of Melnibone, often fights for Law despite his deep connections to Chaos. In the end, he literally makes a better world, destroying his world utterly (though it was already pretty close to destroyed, he and friend Moonglum were apparently the only non-mutated people left) and replacing it with a new world ruled by Law. He is the last survivor of the old world, Moonglum having sacrificed himself to provide energy for making the new world. And there is no place for him in the new world - he almost immediately kills himself.
In Thief of Time, Myria Lejean the Auditor turned human kills herself in the end, believing there is no place for her in the world she helped to save. There is, however, a place for her in the afterlife, as she is greeted by The Grim Reaper like any sentient being, rather than simply having a Cessation of Existence like other Auditors.
Marshal-General Atkins, the last soldier of The Golden Oecumene. A soldier living in a completely pacifist society, and a man legally compelled to behave in certain ways in a society where every other individual has a non-negotiable right to self-determination.
Enjolras, the leader of the revolutionaries in Les Miserables, has a speech to this effect on the barricade after executing Le Cabuc.
In B.F. Skinner's Walden Two,, Frazier admits that his tactics of shaping the human mind to be a good citizen will only work if you start with an infant and raise him in a very controlled environment. Therefore, Frazier himself will never be able to get rid of the many egocentric habits that he has picked up in life.
In Last Stand of Dead Men, Erskine Ravel claims that once his plan is complete, creating a world with mages in charge, he will either hand himself in to face judgment for his crimes, or go into exile.
Doctor Who, "A Town Called Mercy". The Gunslinger, having fulfilled his mission, planned to walk off into the desert to self-destruct, believing he had no place in the world now. The Doctor convinced him otherwise.
Gunslinger: I'm a creature of war. I have no role to play during peace. The Doctor: Except maybe to protect it.
In Mage: The Awakening, many Banishers hold the opinion that all magic is inherently evil. This means that they hold to the belief that they would need to destroy themselves in order to create a world truly devoid of magic (although there are those who hold out hope that it might be possible for them to be rewarded by being freed of their magic).
The Guardians of the Veil believe in a Messianic figure who will close the Abyss and save the world who they need to prepare the way for, and that not only will this figure not be a Guardian, but when the time comes the figure will need to judge them for their sins (the implication is that, whether they are forgiven or condemned, the Guardians themselves will cease to be).
The Space Marines (Adeptus Astartes) of the Imperium in Warhammer 40,000 fit this trope to some extent. They are ordinary humans who are genetically, surgically and hypnotically altered to become fearless killing machines. Although they fight to defend humanity, and are pretty much destined to die while doing it (there's no retirement from the Astartes), they are distinctly non-human and live separated from ordinary humans in bases known as Fortress-Monasteries. A curious variant are the Salamanders Chapters of Space Marines, who do spend a lot of time among ordinary humans - but they are still as superhuman as the other Astartes.
This disconnection from the people they fight for can sometimes create a dissonance - many a Renegade Space Marine probably realized at some point that they were fighting for someone, who in pretty much all respects, were inferior to them - possibly aiding in their decision to go renegade to begin with.
The poignancy of the Astartes condition in this respect was considerably more pressing in the idealistic days of the Great Crusade at the end of the 31st Millennium. Back then the Imperium entertained real hope of uniting the galaxy in a lasting peace, after which the Astartes would no longer be needed. In order to remedy this, many of the more forward-thinking primarchs - especially Roboute Guilliman - encouraged their marines to take an interest in humanity and peaceful human cultural pursuits in preparation for living in such times. In the war-torn 41st Millennium, however, the Imperium struggles just to maintain a deeply flawed status quo of endless warfare - the alternative being total annihilation. Such idealistic hopes for a peaceful utopia as were entertained during the crusade era seem impossibly naive now, so the problem of how the Astartes are going to adapt to it is laughably remote and academic.
Claudia of Silent Hill 3 is happy to stain her own hands with blood and cause The End of the World as We Know It as long as her idea of "Paradise" can happen, but she's more than aware that she herself is too sinful to enter said Paradise.
In the Baldur's Gate expansion pack Throne of Bhaal, Balthasar is on a mission to kill all of the Bhaalspawn. Since he is one himself, his final plan is to kill himself once all of the others are dead. In fact, he planned to use a ritual suicide to ensure Bhaal could never be resurrected.
Kreia from Knights of the Old Republic is well aware that destroying the Force will eliminate her along with the endless Jedi versus Sith conflict that periodically burns the galaxy. And that it might potentially destroy all life in the galaxy because all things contain the Force to some degree. She's perfectly happy with it, and actually delighted that Exile is able to not only prove her theories, but become strong enough to kill her.
If that was ever the goal to begin with. Whether it is the Force or the Jedi & Sith orders that Kreia was out to destroy, either one applies this trope. If she wanted to destroy the Force, it would seem that letting Nihilus continue as he was doing would eventually achieve the goal. But if she wanted to scour the universe of the orders and start anew... Again, either one would have to result in her death. She was, more or less, dead to begin with.
The very end of The Legend of Zelda: The Wind Waker has King Hyrule use the Triforce to grant hope to Link and Zelda. He also decides to have Hyrule washed away by the ocean... permanently. After fighting Ganondorf, Zelda tries to convince the king to come with them to a new land, but he refuses, having realized he is just as tied to Hyrule as Ganondorf.
At the end of the Resistance campaign in Brink, Chen, the Resistance leader, opts to stay behind on the Ark and give up his seat on the plane the Resistance was using to look for land to someone with "less blood on their hands."
At the end of the ActRaiser games, humanity no longer needs the Master, and worship of him slowly fades away. His temples are abandoned, his statues crumble, and he is forgotten.
Used on a small scale, and with a bit of a twist, in Fallout. Your main motivation for everything you've done in the game is to safeguard the Vault you grew up in, first by securing their water-supply, and then by wiping out a major threat to the continued existence of unmutated humanity. However, at the end of the game, as you return to the Vault, you are blocked at the doorstep by the administrator of the place. He outright tells you that you have no place there anymore - you've become too much of an outsider, too much of a warrior, to fit into the peaceful, bottled piece of civilization that Vault represents. How well you take it depends on your choices so far, but the end result is always the same - turning your back on the tiny world you helped save, you wander back out into the dangerous wasteland...
Mirrored in a side quest in Fallout 3 where you return to Vault 101 and resolve the crisis that resulted from you and your father escaping the Vault at the beginning of the game. With the right dialogue choices, you're even exiled with a speech that pays homage to the first game's ending.
Saren in Mass Effect believed his actions and personal sacrifice would save lives in the end. He was pretty heavily indoctrinated though.
Shepard takes this route in the Control Ending of the trilogy, although the human Shepard is no more by that point; the entity calling itself Shepard has Ascended to a Higher Plane of Existence and leads the Reapers. It's implied that Shepard houses their consciousness in the body of Harbingers.
After his defeat in the original storyline of Gods Eater Burst, Johannes reveals that he has no intention on boarding the Ark all along, since he feels that he, who has to sacrifice so many people in his plan, has no right to see the New World.
In Dragon Age, after stopping the Archdemon in Origins, dealing with the sentient Darkspawn in Awakening and the Harvester in Golems of Amgarrak, thus fully ensuring the stability of Ferelden post-Blight, the Warden can decide at the end of Witch Hunt to join Morrigan in passing through the Eluvian, departing to an unknown destination.
Even if this option wasn't taken, Dragon Age II mentions that the Warden eventually disappeared, a few years later.
Freefall has the robot Blunt, whose interpretation of the First Law of Robotics is that all robots must be destroyed, because they are posing a potential threat to humans.
From The Legend of Korra this is one of the possible interpretations of Amon, being an extremely powerful bloodbender who used bloodbending to take away other peoples' bending, if he really believed in his cause and that bending was evil. His brother certainly felt Amon believed in his cause.
Wolverine and the X-Men may have a version, depending on interpretation and inferences. Magneto wants to wage a war against non-mutants, eventually building a mutant utopia on the ashes of the old world. His son is his vanguard in this war, his pawn who's out in the world getting things done. When he's not screwing it up. His first daughter is his general, helping him run Genosha and acts as his primary aide; she knows most of the unpleasant bits of business he gets up to and accepts it as necessary. His youngest daughter however is completely innocent. She knows nothing about what Magneto has done. He likely intended her, who shares his powers but not his temperament, to be the enlightened ruler of the utopia he built.
In Green Lantern: The Animated Series, when Aya decides to purge all life from the universe and have it entirely occupied by robots because she thinks emotions are bad, Hal demonstrates to her that she's not entirely a machine, and will be destroyed herself. She decides that this is irrelevent.
"I suppose that in any well-ordered society people like us would be locked up or shot. But then you would have to get people like us to do the locking up and the shooting." ó Jim Morris (US Army Special Forces)