Rurouni Kenshin: Part of the reason the titular hero became The Atoner was that he could no longer ignore the fact that he was killing people regardless of how good the motives were. Being indirectly responsible for the death of the woman he loved was the metaphorical last straw. Each major fight afterward, Kenshin speechifies about what he was fighting for, and it takes a Heroic BSOD for him to realize that he can only fight for his own personal peace of mind. The Seisouhen OVA then goes on to erase all of that Character Development and have Kenshin still so wracked by guilt that he abandons his family to go Walking the Earth again; it's not until the very end that he returns, only to die in Kaoru's arms, and she dies moments later because he's infected her too. Mind you, Yahiko has taken up Kenshin's mantle, and his son Kenji eventually comes around to the same point of view, but there's a reason most fans and Nobuhiro Watsuki himself, who didn't write it, deny Seisouhen's existence.
Queen's Blade sees this happen in the Rebellion series, where the victorious Leina hands the mantle of Queen to her sister, Claudette, who goes on to make many reforms as Leina happily retires. The key sticking point is that the Swamp Witch is still free at the end of the first series, and she continues to expand her poisoned domain, starts cursing all of the old heroines to put them out of commission entirely or limit their fighting ability, and corrupts Claudette into a Well-Intentioned ExtremistKnight Templar who rules with an iron fist, making the "Rebellion" necessary.
Eureka Seven AO, shows that Eureka and Renton's child is abandoned in another dimension. It's later revealed that Correlion/Human babies can't survive because high density Trapar levels.
The final issue of Warren Ellis' run on Doom 2099 saw Doom about to realize his goal of creating a utopia by releasing thought-controlled Nanomachines that would give people whatever they wanted for free. The first three words in the next issue are "it didn't work."
This hits the Alien franchise on two seperate occasions.
The transition from Aliens to Alienł, in which Hicks, Bishop, and Newt, the three that Ripley fought tooth and nail to save in the previous movie, are killed off-screenbefore the opening credits. Bishop technically survives, but he's damaged beyond repair and permanently turned off by Ripley.James Cameron was horrified that the survivors from his film died horribly instead of being able to start a family (with the exception of Ripley), and the author hired to write novelizations for the series went so far as to call this twist "obscene". Then Alien: Resurrectioncompletely negates Ripley's Heroic Sacrifice by bringing her back to life and putting alien DNA into the hands of another Corrupt Corporation.
Men in Black: Agent K passes the torch to Agent J and moves on to a well-earned retirement with the wife he hasn't seen in decades, J forms a new partnership with L, and everybody wins! Then MIB2 comes along and decides to completely rehash the original, so L breaks up with J and goes back to her old life (offscreen), leading J to reactivate K (because being Neuralized is reversible now), which is okay because K's girl left him too, so he's miserable and bored. Yay?
Happens in the Star Wars Ewok Adventures of all movies. Caravan of Courage had a teenage boy and his younger sister team up with some teddy bears to rescue their parents from a giant. Within the first few minutes of Battle for Endor all the humans except the little girl are killed by Space Pirates, who go on to slaughter or enslave all but one of the Ewoks.
Ghostbusters ends with the titular team defeating an ancient Sumerian deity, sending it back where it came from, and being hailed as heroes by a grateful city (and, we imagine, world). The sequel opens up five years later with their reputation in shambles, the partnership dissolved, a court order preventing them from offering their services, and some of them even being so desperate that they have taken to performing at birthday parties. Peter and Dana broke up too. Fortunately, the happy ending of that movie seems to stick, as the video game (which is considered canon) shows them still active a few years later, and the current mayoral administration having very Ghostbuster-friendly policies.
In the Star Wars expanded universe, following the defeat of the Emperor, over the course of several decades we get repeated Imperial counterattacks, Palpatine returning and converting Luke to the Dark Side, a race of freaky humanoids invading and ravaging the Galaxy (and killing Chewbacca), and most of Han and Leia's children dying or going to the Dark Side. This all comes to a head with the Legacy comics, which have (a somewhat more Federation-like) Empire back on top 130 years after the films. Even the Sith are still a lurking threat.
Happens in the second Chronicles Of Thomas Covenant series, though at least it is made fairly clear in the first one the Big Bad cannot be technically killed. Even so it was a kick in the gut, though not a surprise given the nature of the series.
The first Sword of Truth book has the Seeker fight to defeat the evil tyrant Darken Rahl. When he finally succeeds, a new crisis, even worse than Rahl's tyranny takes its place in the second book. Eventually, Richard discovers that The Empire he fought against in the first book is nothing compared to the Imperial Order, a massive empire that has somehow remained unknown to everyone else.
In Warrior Cats, the first arc ends on a pure happy ending. The sequel has humans tear down the forest which the story is set in and reveals that the villain is still hanging around from beyond the grave.
In Starchild trilogy by Frederik Pohl and Jack Williamson the humanity controlled by totalitarian Plan of Man which is ruled by supercomputer called the Machine. It's implied however that this is the only way to survive for enormous population whose expansion is restricted by limitations of ion engines. At the end of the first book the protagonist invents "reactionless drives" and the Machine declares that harsh control is no longer required. However in the second book this decision of the Machine is completely forgotten... May be justified because the events of the first book showed that high-ranking officials of the Plan can influence on the decisions of the Machine and may not be interested in the change.
Troubling A Star by Madeleine L'Engle brings back the fictional country of Vespugia from A Swiftly Tilting Planet and reveals that the events of the latter book only delayed the country's dictatorial government from coming to power by about 10 or 15 years, rather than averting it entirely.
The book Holes ends with the juvenile detention facility Camp Green Lake being closed, and turned into a Girl Scout camp. In the companion book Stanley Yelnats's Guide To Surviving Camp Green Lake, the detention was been reopened, because several state officials read Holes and thought "What agreat idea!" Even the original staff gets put back in charge, despite being under investigation, and one even arrested.
Between the first and second season of Heroes Matt Parkman's forgiveness of his wife and the happy reunion of Niki with DL were both undone. So was Sylar's death, but this had been heavily implied to begin with.
24 did this for Tony Almeida. During the third season, Tony was forced into some tough choices that saw him lose everything: he was stripped of his job, his wife Michelle left him, and even wound up briefly being jailed. Season four then went about giving him personal redemption, helping Jack Bauer stop a terrorist threat that ultimately saw a nuclear missile nearly hit L.A., and by the time it was over he'd managed to get his life back in order and get back together with Michelle. So what does season 5 proceed to do? Within the first 15 minutes of the premiere she's killed by a car bomb as part of the antagonists of that Day's plot, leading him to lose it for the rest of the series and eventually sink so low that in Roaring Rampage of Revenge to avenge her death winds up working with terrorists. Yeah. Definitely made the fourth season's happy ending a moot point there.
In a-ha's music video to "The Sun Always Shines on TV", the video starts with the character from their "Take On Me" video turning back into a drawing and disappearing while the girl watches helplessly.
Zero of Mega Man X fame may well have delivered the iconic line quoted up top, but he is hardly the best example... until he gets his own series where despite all the sacrifices, things get worse.
.hack//G.U. seems to have been engineered for the sole purpose of trolling fans of the original series, either as a Player Punch or a colossal This Loser Is You to anyone who accepted its message of "AI are people too" at face value. The World that we left happy, peaceful and safe in the first series has been completely destroyed by a madman (who personally killed a plot-important AI character from the original series in backstory), Player Killers rule the landscape of the Darker and Edgier The World R:2, all of our previous heroes are too busy with real life to do anything about the situation, protagonist Haseo turns out to have been that childish jackass Sora from R:1 all along...and in the end, the bastard responsible gets neither mention nor punishment.
In Gears of War 2, we first discover that not only has the Lightmass Bomb, which was dropped in the heart of the Locust's underground hive network at the close of the last game, failed to destroy the Locust, but that they have since redoubled their efforts (later revealed to be in desperation), and mankind has been forced back to their last bastion of defense, Jacinto. Not only that, but the Locust now have a method of sinking entire cities. At the end of the game, the heroes are forced to sink Jacinto in order to flood the underground networks and hopefully take out the Locust once and for all.
The Jak and Daxter series may be the all-time champion of this. We leave the first game with our heroes triumphant over the Card Carrying Villains and about to embark on a new journey into the unknown. Then in the first few minutes of the second game we discover that their journey into the unknown takes them Twenty Minutes into the Future, where the idyllic natural paradise has become a Cyber PunkCrapsack World ruled by an iron-fisted dictator and under siege from a seemingly endless swarm of monsters called "Metalheads." The villains from the first game seem rather pleasant by comparison (hell, the mooks from the first game have been turned into pets by Haven's apathetic Citizens). Then after completing the game and bringing peace to Haven City, we open Jak 3 to find that the city has been nearly destroyed and Jak and Daxter exiled to the wastelands.
At the end of Diablo, the hero has defeated the titular demon, saving the one town that was in danger before, and taken it upon him (or her) self to become a living prison for the Lord of Terror. At the start of Diablo 2, said hero's will has completely broken, his body has been taken over by Diablo, and he wanders the Earth releasing other demon lords so they can plunge the entire world into a living Hell. And that one town? Completely ravaged, and all residents but one are soon dead. And Diablo 3 looks to make things even worse than they were in 2...
Almost fell into this trope by having the first campaign lead to the second one, as the helicopter pilot would have been revealed to be infected. However, the developers found out it was not a satisfactory ending, and made the four campaigns completely separate instead... before changing their minds again and releasing a mini-campaign that links the original first and second with exactly that justification. And then they use it again in Left 4 Dead 2, to set up the third Campaign.
The ending to the first game managed to do this to both games after trying to tie the narratives together. At the end of the last campaign of the first game, your team is finally rescued by the military. Not some random pilot or civilian with a gun, but the ones who knows what they're doing and are backed by armored vehicles and real weapons. Then in the tie-in comic everything goes to hell as it turns out the military doesn't know what they're doing, and on top of that all of the protagonists are carriers; asymptomatic carriers of the virus that are unintentionally spreading the infection to everyone they've come across. And the military do not like carriers. The comic managed to conclude that the original game's protagonists do manage to earn a new happy ending (although not without some costs), but the second game ends with the four new guys happily rescued by the military...
In the original Geneforge, the best ending has you destroying the Geneforge and saving the world from its menace. In the sequel, we find that Zakary and Barzahl, two characters sent to clean up after the fact, thought that it would be a shame to let such a marvel of science vanish from existence, and decided to rebuild it in another isolated area. The third game ramps it up that no matter what you did (except for one Take a Third Option faction ending of the second), your actions did nothing to stop the Drakon's Rise. The fourth game averts this by stating that the Rebel Ending of the third game is canon. The fifth game also qualifies—the Unbound, released in the fourth game to destroy the Shapers, have succeeded only in causing massive collateral damage, and it's up to a new main character to resolve the conflict. Which may fit with one of a hidden factions endings of the fourth game.
Each Geneforge tends to assume a particular outcome from the previous game, but it's usually not any of the (many) actually available endings. It's often a blend of a few with some more things that aren't from any of the endings added in. Then this is all made even stranger by the fact that the role and fate of the player character from previous games is alluded to but never clarified; by the fifth game, this leads to some impressive Wild Mass Guessing about the protagonist's identity.
Final Fantasy XIII-2. At the end of the first game, Lightning and friends managed to Take a Third Option and defeat the Jerkass Gods without totally destroying the world, Serah returns to normal and Lightning approves of her marriage to Snow. Then the sequel reveals that Lightning disappeared due to Time Paradox shortly afterwards, and Snow left to look for her, leaving Serah alone. A time traveler from the future arrives and reveals that he's the last of humanity living After the End. Furthermore that crystal pillar holding up Cocoon won't hold out forever, and then, well...
Inverted with Final Fantasy X-2. The first game ended on a bittersweet note with Tidus disappearing. The sequel sets to rectify this and, while the conflict the protagonists face is pretty big, it doesn't reach the heights of the previous game - the Big Bad is a dangerously powerful machine as opposed to an Eldritch Abomination that can't be killed. There are multiple endings for the player to get and most of them (bar one bad ending you get if you lose the Final Battle) are happy. The player can choose whether or not Yuna can reunite with Tidus and if she doesn't, the ending is still uplifting because she has moved on.
This is actually the main theme of Knights of the Old Republic 2. After making a survey of expanded universe material, Chris Avellone realized that pretty much all of Galactic History is the same cyclical war between a Sith-backed Empire and a Jedi-Backed Republic, repeated constantly for thousands and thousands of years. The antagonist is a former Jedi who realises this and attempts to end the war by obliterating the Jedi and creating a new breed of Sith who are able to live without the Force. She also critiques the Light and Dark sides of the force for their simplistic and adolescent understandings of morality.
Which can be read as a Take That against everyone who created the expanded universe, for not having the imagination to come up with anything but endless repetitions of the same conflict, and against George Lucas himself for the aforementioned Black and White Morality.
You can choose, at the beginning of Knights of the Old Republic 2, whether the protagonist of the first game was a Light Side hero who saved the universe or a Dark Side menace who shattered the last hope of survival for civilization as you know it. It's probably best to choose the Dark Side ending, it at least makes the massively crapsack end-of-the-Jedi scenario that the second game plays out make sense.
And the MMO Star Wars: The Old Republic has established that Revan and Exile went off to fight the True Sith. Exile died. Revan was imprisoned and the Emperor fed on his mind, but he managed to stall the Sith Emperor for 300 years, giving the Republic time to recover from the destruction he himself caused. Had the True Sith attacked when the Emperor originally wanted, the Republic likely wouldn't have been able to resist at all, making for more of a Bittersweet Ending than anything.
According to the official Guild Wars 2 lore, neither Tyria nor Elona has fared too well during the 200 years between games. Cantha may have, but it's become highly isolationist so no one has any idea.
Happens in Modern Warfare 2, where Shepherd, Soap, and Price all ask why they fought the last war against the Ultranationalists, if things just became worse afterwards.
The older Call of Duty games that takes place during the World War II all end with the Allies victorious and the fascists defeated, and the endings of the very first game and World at War are pretty highly optimistic about the future. But anyone who knows anything about the Cold War or who played Call of Duty: Black Ops will know that the future is anything but sunshine and rainbows.
Similar to Modern Warfare 2, Half-Life ends with Gordon Freeman successfully killing the alien being that prevented the scientists on earth from sealing the portal that spewed forth endless hordes of alien invaders. He gets captured by the G-Man and put into a freezer, but at least Earth is safe. More than a decade later Gordon is brought back to Earth, only to learn that the alien being he killed was just desperate to allow its own people to escape from an even scarier and more powerful alien invasion of its home dimension. With Freeman taking care of their leader, the Combine quickly had the alien world conquered and continued its campaign by invading Earth as well.
When Fire Emblem: Path of Radiance ends, the Evil Empire has been defeated, Crimea is entering a new golden age and reestablishing ties with the laguz, and the world is by and large peaceful - even the massive Begnion theocracy seems well at ease with the world. By the time of Radiant Dawn, Crimea is being undermined by greedy nobles (including one who starts an open revolution), Daein (the aforementioned Evil Empire) is completely oppressed by the occupational Begnion forces, and Begnion itself is in the midst of a power struggle between its senate and its empress - and to top it all off, the laguz wind up going to war with Begnion partway through the game. The fact just about the entire world is now at war with someone becomes a plot point.
Golden Sun and its continuation ended with the world being saved by the party, everyone from the Doomed Hometown happily surviving, and the Big Bad sinking beneath the earth as a volcano erupted beneath him. 30 years later in Golden Sun: Dark Dawn, the world is made up of several powerful warring nations, most people are unhappy with the protagonists of the previous games saving the world, half the original party just straight up vanished, and to top it all off, magic-eating vortexes have started popping up. OH. And the previous Big Bad is back.
Kingdom Hearts ends with Sora still looking for a way to find his best friends, but the worlds, at least, seem saved. Then it turns out The Heartless are still plentiful if no longer endangering reality, new enemies are showing up, and the first universe-threatening Big Bad was only one aspect of a greater villain with a very confusing history.
In MOTHER 1 and EarthBound, humans are fighting the evil alien Giygas, although only the protagonists, a couple of kids, know that it's him that they're fighting, and in the first game, you don't even find that out until very late in the story, but it's All There Is to Know About "The Crying Game" anyway, especially outside of Japan. Giygas, in the first game, is attempting to enslave the entire human race, and his army does some pretty bad stuff. But, the heroes sing a song to him and he goes mad from the nostalgia and gives up on trying to conquer Earth. But, later, although it is only revealed in the second game, Giygas comes back with a vengeance and conquers the entire universe, turning it into a living hell. The End. (Don't worry, someone comes back from that future and stops it from happening in the second game.)
Starlancer involves the player thrust into a desperate war between The Alliance and the Coalition on the side of the Alliance. While the Coalition's sneak attack deals a heavy blow to the Alliance, the multiple successes by the player's squadron (including destroying countless enemy ships and the Coalition flagship) seem to indicate that the Alliance may yet prevail. Then Freelancer happens, a game almost completely unrelated to Starlancer except for the intro, which reveals that the Alliance-Coalition war lasted for another century, with the Coalition being the inevitable victor (unless you count the original E3 trailer). There was absolutely no reason to make Freelancer a sequel of Starlancer, as it has completely different gameplay and takes place 900 years later. Not one character or news report in Freelancer mentions either side or the war, despite the intro's emphatic "We will never forget". Thanks for ruining the game, Chris Roberts!
Star Trek: Armada ends with The Federation, the Klingons, and the Romulans allying to stop a massive Borg invasion, which is barely stopped and ends on a typical upbeat Trek note. Guess what? The Borg are back in the sequel, stronger than before. The Cardassians also decide to attack the Federation for no reason, even though they should still be devastated from the Dominion War. And Species 8472 randomly decide to wipe out everyone else, despite Janeway earlier convincing them that the Federation means them no harm.
There's a certain degree of this in Star Trek Online as well. The Klingon/Federation Alliance, which Kirk's crew fought so hard to establish, is broken (though that was foreshadowed, pretty much every live action Star Trek that went that far into the future had the Federation and Klingons on bad terms); the hope of reconciliation with the Romulans that Star Trek: Nemesis ends on is destroyed along with Romulus (although admittedly, that's more due to the Star Trek XI movie); The Mirror Universe is back in the hands of an evil Terran empire; Voyager's defeat of the Borg in the finale and the tentative peace with Species 8472 are shattered...even one-note villains like the Breen and Devidians are up in arms. The only thing that hasn't been completely destroyed from the series is the establishment of Democracy on Cardassia, but there are a lot of left over villains from DS9 who are set on destroying that one, too. (This isn't necessarily a bad thing for an MMORPG setting, however, and the fall seems to make logical sense if you read the backstory of the intervening 30 years.)
The Legacy of Romulus free expansion/season/thingy partly overrode the Star Trek XI and related overriding of the Nemesis Romulan reconciliation hope — there is no real chance of a reconciliation with the Romulan Star Empire after the events of the game... but the rising Romulan Republic (which by the end of their storyline pretty much is well on their way to being the single strongest faction in what used to be Romulan space) is quite conciliated and is in fact even allies with the Federation (and the Klingons. They're neutral on the Federation-Klingon war).
The Legend of Zelda: The Wind Waker reveals in the opening credits that after Hyrule is saved in Ocarina of Time, eventually Ganondorf is freed and Link does not arrive to save the day, causing the world to become lost, and the land flooded by the gods.
And then in its climax; it's revealed that the King sacrificed the Triforce and Hyrule to prevent Link and Zelda from being eternally reborn and forced to fight the same battle over and over again, and let them have their own existence. It couldn't last. In the latest installments, Ganon may not be back, but Link and Zelda are back in the same roles.
The prequel to the series as a whole, The Legend of Zelda: Skyward Sword, makes the Wind Waker timeline's situation even more dire, since Ganon is merely the symptom, not the disease; killing him and destroying Hyrule forever didn't lift Demise's curse from Link's bloodline, and so incarnations of the demon king's hate will continue to haunt Link's descendants unless the curse is somehow broken. Essentially all killing Ganon accomplished was severing the curse's connection to the Triforce and losing the Master Sword, the most powerful weapon of good in the world, forever.
The Legend of Zelda: Twilight Princess overrides many of the hopeful overtures of Zelda's decision to return Link to his original time. She had obviously intended for him to regain his lost years and live his life in peace. If The Legend of Zelda: Majora's Mask hadn't already obliterated any delusions of that happening, The Legend of Zelda: Twilight Princess went a step further to confirm his lifelong Chronic Hero Syndrome, having him appear as the Hero's Shade and a mentor to the new Hero. The fact that he contributed to a thriving bloodline meant that he eventually settled down enough to have a family, but he still lingered for more than a century in the afterlife out of regret for his lost title.
The ending of Tales Of Itzkeria is pretty happy - Itzka and his friends defeat the evil (Or is he?) Darius, ending his guild and his ambitions of world domination. Conveniently, the Emperor gets a heart attack, and Itzka is appointed as his successor, finally bringing peace to the land! Aside from the unfortunate implication that Laura will die soon due to her accelerated aging, as revealed in the true ending there is nothing to indicate the finale is anything but happy. Jump forward to the sequel, where it's revealed that, within 20 years, Itzka has become a ruthless dictator who's not above burning cities (ironic, considering the burning of his hometown jump-started the plot of the first game) and slaughtering all inside just because they dared to oppose him.
All those Alien Wars you've been fighting for the majority of the Contra series and winning? As of Contra: Shattered Soldier, it turns out that the war was actually part of a Government Conspiracy known as the Triumvirate, and that Lance Bean had accidentally uncovered the truth about it. Hence the fact that Lance became a notorious terrorist leader trying to overthrow the Triumvirate after Bill Rizer was thought to have killed Lance and destroyed 80% of the world's population.
Atop the Fourth Wall. After Linkara defeats his evil robot counterpart (actually Pollo from another universe), it's revealed that Mechakara wasn't the only one who escaped into Linkara's universe. And the other person who did? Lord Vyce, an all-powerful Multiversal Conqueror who makes Mechakara look weak by comparison. But at least Linkara is able to defeat Vyce. Except THEN he learns that the reason Vyce was out conquering universes is to protect them from The Entity, an Eldritch Abomination bent on consuming entire universes and make everyone in them disappear forever.
Lewis stated in an interview that he wanted to keep invoking this trope with bigger and bigger threats, but couldn't come up with anything stronger than a god, so he switched to character-driven story arcs instead.
Beast Wars ended with the Maximals successfully capturing Megatron and taking him back to Cybertron, with him tied to the roof of their spaceship. However, in Beast Machines, it's revealed that Megatron has been able to successfully take over Cybertron, in large part because was left outside the spaceship note it let him jump off and out of the timestream and return to Cybertron much earlier than the Maximals.
Originally, had there been a fourth season of Transformers Animated, their version of Megatron would have escaped from prison (he is arrested at the end of the show's final episode), possibly with help from Team Chaar, and been reformatted into a Triple Changer.
The ending of Osmosis Jones has Frank turn his life around and adopt a healthier lifestyle, and we see him spending time outdoors with his daughter. In Ozzy and Drix, on the other hand, Frank is once again an obese slob, suggesting that either he has relapsed back into unhealthy habits or Ozzy and Drix is an Alternate Continuity, and if the latter, then Frank will be killed by Thrax.
The Allies spent four years and millions of lives to win "The War to End All Wars." Twenty years later they had to do it all over again, with an enemy regime which made the Kaiser's empire look like a jolly fairy-tale kingdom by comparison.
The most poignant example is France, which lost 1.7 million people in the war, over 4% of its population, and had several heroic You Shall Not Pass moments. All this, only to be overrun by German troops in a few weeks in 1940, and the country still can Never Live It Down.
Then came the Cold War, decades of nuclear dread and brinksmanship and proxy wars of which we're still dealing with the after-effects.
India. After two centuries as a British colony, the Indians decided it was time to gain independence. Some started guerrilla warfare against the British with Japanese and German support during World War II, but most took part of Gandhi's pacifistic, non-violent way. Gandhi also demanded that an independent India should be an united nation free from ethnic and social differences, consumerism and violence. In 1947, India finally became independent. Cue ethnic wars between Muslims and Hindus, Pakistan splitting from India, Gandhi assassinated by one of his own and an India that is today everything but a caste-, consumerist- and violence-free nation.
Africa. After centuries of being nothing but a giant candy-basket for greedy European and Arabian colonists and slavers, native Africans all over the continent decided to take back their lands from the foreigners during the middle of the 20th century, putting their tribal and cultural differences aside while their struggle went on. By the 1970s, all of Africa was free from any foreign government. Cut to bloody civil wars, genocides of unprecedented brutality, military coups, crimes against humanity, extreme poaching which has driven several species to near extinction, Mega Corp. corruption, widespread diseases, famine, millions of refugees, extreme poverty, the AIDS epidemic, rising religious fundamentalism, failed states, piracy... And the kicker is that any student of dependency theory will tell you that those greedy foreigners are still in de facto control of the continent.
From a certain point of view, the French Revolution. At first it seemed like the economically bankrupt, stagnant, inefficient, and unrepresentative absolute monarchy had given way with relatively little bloodshed to a more functional constitutional monarchy working with a strong representative body, but by 1792 things break down, the king and queen have been executed and replaced by the most radical republic Europe has seen, and thousands more are being beheaded in Paris and across France. It takes decades of more radical regime changes and more minor but still significant revolutions until France finally settles down with a moderate republic, the Third Republic, which lasts into the twentiteth century until it's destroyed in WWII, leading eventually to the Fourth Republic.
The United States itself could be considered this up until about the end of the Reconstruction period after the Civil War. The first happy ending is, of course, the end of the American Revolution. The colonies are free! Except several dozen years of squabbling ensued before the current Constitution with its Bill of Rights is installed, Washington becomes the first President, and everything is jolly! Except for the Indians, and the British going to war again in 1812, and the whole slavery issue, which brought everything to a head in the Civil War. Then at its end in 1865, the slaves were free, the country was reunited, and everyone lived happily ever after! Except for the ravaged south...and Lincoln... and all the black people who thought they would be able to live as equal citizens....