The lines between good and evil in comics can become extremely blurry. When you have characters that have been around for decades, that character inevitably crosses back and forth across the line between the two. In some cases, with great frequency.
But what leads to this change? Is it simply a matter of a writer needing to tell a different story? Or is it organic growth in the character? Regardless of the reason, some of the best stories in comics happen when villains do something heroic, sometimes by choice and other times by necessity. There are situations that simply require a bad guy to do good.
10 Bad Octopus, Good Octopus
For years, Doctor Octopus was one of Spider-Man's most dangerous foes. He was as smart as Peter Parker and as focused, just not on anything on the right side of the law. In a last ditch attempt to save his life, Doc Ock transferred consciousness into Parker's body, becoming the Superior Spider-Man. Even after things went back to normal for Parker, and Doc Ock went to a clone body, he was constantly nagged by Parker's sense of right and wrong. This led him to recently face off against the Red Goblin to save the life of Aunt May, turning over a new leaf as a hero.
9 Joker And The Batman Who Laughs
When The Batman Who Laughs appeared on the DC scene in Dark Nights: Metal, he caused quite a stir. This version of Batman who has the moral compass of the Joker is terrifying, attacking everyone and anything within striking distance. On his own, Batman cannot defeat him. He needs backup which he gets in the form of his greatest enemy, the Joker. While Joker always works in mysterious ways that only make sense to him, Batman couldn't have defeated The Batman Who Laughs and saved the world without his help.
8 Galactus Fights For The Universe
He survived the death of the previous universe and essentially became a god in the next one. He consumes entire worlds to survive. He is Galactus, one of the most feared forces in Marvel Comics. While he does what he does to survive and not because his intentions are evil, he consistently puts his survival ahead of all other life. But when the situation calls for it, Galactus stands on the side of the heroes. During the original Infinity Gauntlet and subsequent stories like Infinity War, Galactus stood with the universe's heroes to save the entirety if reality.
7 Thanos Saves Everything...With Death
The name Thanos is synonymous with death in Marvel Comics. Like his film counterpart, he snaps his fingers and kills half the universe. Unlike his film counterpart, he does it to hit on the personification of Death in Marvel, the love of his life. Thanos plays for the side of the angels when it suits him, too. As Thanos fights the Cancerverse in The Thanos Imperative, he allows himself to be captured and sacrificed by their evil version of Mar-Vell. It's all a calculated move to let Death into the Cancerverse, a misstep that costs Mar-Vell his undead life.
6 Doctor Doom, AKA The Infamous Iron Man
There are a lot of words you can use to describe Doctor Doom, and hero is one of them. After the apparent death of Tony Stark, Victor Von Doom chose to change his super villain ways and take over the mantle of Iron Man. Well, after putting his own spin on the hero, of course. Despite his change of heart, his old enemies found it difficult to trust him, particularly The Thing. Doom's new journey even led him to fight alongside the Avengers as part of his own larger mission.
5 Lex Luthor, Man Of Steel
Doctor Doom isn't the only villain who can put on a suit of armor and switch sides. After the death of the New 52 iteration of Superman during DC Rebirth, Lex Luthor put on a new suit of armor adorned with Superman's symbol and chose to protect Metropolis. When the pre-Flashpoint version of Superman returned, he quite naturally questioned Luthor's motives. This resulted in a calm conversation. Just kidding. They had a fight, which was broken up by the reappearance of Doomsday, a threat they had to work together to stop.
4 The Master Of Changing Sides
Magneto has walked the line between hero and villain his entire career. While he's often painted as a villain, his actions are to benefit and support all mutants in his world. Unfortunately, he often doesn't care how many humans he tramples on to do it. When the situation calls for it, he has not only teamed up with the X-Men, he has led them. While living with them on the island of Utopia. he used his powers to save San Francisco from a devastating earthquake. That's a good way to make new human friends.
3 Darkseid's Good Side
The most malevolent force in DC Comics is Darkseid, Lord of Apocalypse. He seeks nothing less than total control over all life in the universe and will crush anyone who gets in his way. That being said, there are times he has stood against the forces of evil. He has faced off against both Doomsday and Galactus, losing to them both. In the late 80s, Darkseid stood with Earth's heroes against the anti-life equation. He even went so far as to organize their attack and arm them for the mission.
2 Sinestro Reverses Roles With Hal Jordan
After the destruction of Coast City at the hands of Mongul, Hal Jordan completely and utterly snaps. In order to gain the power to fix this, he murders the Green Lantern Corps and most of the Guardians. In a last ditch attempt to stop him, the Guardians send Sinestro to face Hal. Once their greatest hero, Sinestro turned evil and became their greatest villain. But this time he agreed to face Hal Jordan in an attempt to stop him from doing something horrible. Unfortunately, Sinestro failed, leading to Zero Hour.
1 Skurge Blocks The Gates Of Hel
The warrior known as Skurge the Executioner started his career as one of Asgard's greatest heroes but fell under the thrall of the Enchantress, one of Thor's greatest enemies. He stayed by her side for years, facing off against Thor, the Avengers and more in his career. After finally freeing himself from the Enchantress, Skurge joined Thor in an attempt to rescue stolen souls from Hela. They then tried to escape Hel, pursued by a vast army of the dead. With a pair of M16s in hand, Skurge blocked the path, securing Thor and company's escape.