Final Fantasy: The Spirits Within: General Hein just wants to kill the phantoms to save people from being killed by them. Unfortunately, his way of doing so involves killing a bunch more people instead of finding a solution to the problem from the roots, as the Heroine is trying to do, and actively tries to stop them. Yet, still, he is not an outright villain. He has a literal My God, What Have I Done? moment.
Pixar has some examples - Pete Docter, director of Up and Monsters, Inc., even said what he thinks is a "true" villain ("I'm gonna wake up and do evil!") is an unrealistic character.
Waternoose from Monsters, Inc. is a father-like figure to Sulley and his motto "We Scare Because We Care" is genuine, as he really does wish to maintain the Monster World through providing energy from children's screams. He also honestly believes that children are harder to scare than they used to be, and is determined to find a way to get them screaming at any cost. So, to this end, he has Randall build a horrifying machine that will suck the screams out of children and, as he says to Sulley, is willing to "kidnap a THOUSAND children before I let this company die...and silence anyone who gets in my way!"
WALLE's AUTO, the autopilot of the Axiom, refuses to let the inhabitants go back to Earth, even though this directive is more than 700 years old and plant life does exist (as shown at the end). But hey, he's a computer. He can't choose not to follow his programming. He's not so much a crazy A.I. as just following an ill-considered directive by a man seven centuries dead. Besides, realistically speaking, one healthy plant does not promise enough resources for the entire population of that huge ship. Which is another reason why Pixar decided to add that lengthy musical montage as the coda.
The Secret of Kells has Abbot Cellach. He acts like a total Jerkass and is completely obsessed with building his wall, to the point where he disdains and eventually forbids his monks from doing anything else. However, the point of the wall is to keep out the Vikings, who already killed all the family he had except for his young, impressionable nephew, who now wants to do non-wall related things like go outside and create beautiful holy books. He doesn't listen when Aidan tells him that his wall won't hold and they should all flee instead, which leads to the deaths of many, many innocent people.
Macha the Owl Witch from Song of the Sea is revealed to be this. She truly believes she's helping the magical beings of the world by stealing all their emotions, turning them to stone. Since turbulent emotions bring pain and grief, she thinks she's easing their suffering. When Ben released her feelings back to her, Macha has a Heel Realization moment, begs his forgiveness and tells him that she couldn't bear to see her son in such pain.
Strange Magic: The Bog King unlawfully holds the Sugarplum Fairy without trial, tries wiping out an entire species of plants and closes the borders to his kingdom for the admirable goal of preventing love potions from ruining more lives.
Charles Muntz from Up just wants to catch a bird and prove that he was right. Unfortunately, his methods (after going completely crazy) include killing everybody who shows up at his refuge and gets in his way.
Zootopia: Mayor Lionheart is revealed as the one responsible for organizing the kidnapping of the missing mammals. However, he was doing so because they were going savage, and he was trying to avoid loss of life, a mass panic, and find a cure. At the end of the movie, he admits what he did was wrong saying it was "doing the wrong thing for the right reason".
Films — Live-Action
2001: A Space Odyssey: HAL 9000 is only devoted to the mission at hand, and believes that Dave and Frank will jeopardize the mission by disconnecting HAL after lip-reading from them that they intend to do so if the AE-35 component does not fail as HAL has predicted. It turns out this was due to a Logic Bomb: he had been told to lie about the nature of the mission, which conflicted with his programming of providing clear and accessible information, which triggered his breakdown.
The Amazing Spider-Man: Dr. Connors longs to create a world in which everyone is equal, a world in which illness and weakness don't exist. Injected with the Lizard serum, he comes to the conclusion his vision can be made reality by making everyone like him, even if that means forcing the change upon everyone against their will.
Batman & Robin: Poison Ivy, though she does make her extremist ways known from the outset, as well as the version of the character from Batman: The Animated Series. In fact, most of the animated Bat-villains are sympathetic in their first appearance, then less so as their motivation shifts to "revenge on Batman". A similar thing happened with the version from The Batman, who was set up as even more sympathetic due to being a teenager, but, in subsequent appearances, becomes simply a villain. Subverted in the show's spin-off comic "The Batman Strikes", in which her sympathetic aspects and good intentions are retained.
In Big Game, the vice president, Hazar and Herbert. They believe that they act for the good of their country, even if it means taking down the US president and torturing him to death to create a martyr.
Blood Of The Vampire: Dr. Callistratus may be a Mad Scientist who performs human experimentations among other horrific acts, but he does what he does in the name of science, and to that end he's trying to make advancements in blood transfusions that in 1880 hadn't yet been discovered, including the sorting of blood groups. It's for this reason that he was executed for being a vampire at the start of the film: the accusations came because he was trying to transfuse blood.
The brothers' crusade against evil through vigilantism.
Category 6: when Mega-Corp Lexer ignores Dan London's repeated warnings that their power grids are woefully underprotected, he tries to make an example by covertly hacking their mainframe. Unfortunately, a freak chain of events causes this simple What the Hell, Hero? to cause the city's entire power supply to be cut off.
Circle: The College Guy suggests killing off the oldest people in the room first to buy themselves more time and come up with some sort of plan to escape. Most of the room goes along with him when it's people in their eighties and seventies, but when College Guy keeps lowering the age by targeting Cancer Survivor Lady (who insists that she's 52 but looks older), he pisses off enough people to be outvoted next.
Batman Begins: A pretty interesting example, as Ducard and Ra's al Ghul or rather Ra's al Ghul and Ra's al Ghul's decoy believe that Gotham is a city plagued by too many evils and is filled with suffering and injustices. They also believe that murdering violent criminals is justifiable but Bruce believes that murdering a villain would be stooping to their level.
The Dark Knight Rises: Bane is supposedly continuing Ducard and Ra's al Ghul's plan, while also showing the problems with Gotham's authorities. Though the woman behind the man, Talia al Ghul, is also doing it for revenge on both her hard life and Batman killing her father.
Death Warrant: The mastermind behind the plot, State Attorney Tom Vogler, killed violent prisoners (whom he claims no one will miss anyway) because of the desperate shortage of organ transplants on the market. He also did it to save his beloved wife.
Death Wish is one of the Most Triumphant Examples of this trope, with Charles Bronson killing any thugs who menace others... granted, they have a terminal case of Too Dumb to Live going after Bronson, but still.
Deep Blue Sea: Dr. Susan McAllister used illegal means to increase the sharks' brain sizes so she could use the hormones harvested from them to manufacture a cure for Alzheimer's disease, which her own father previously succumbed to. She's ultimately responsible for the deaths in the film, but her motives were altruistic, not based in greed or a desire for fame.
Demolition Man: Dr. Raymond Cocteau is an even handed example. On one hand, he did do a stand up job of cleaning up Los Angeles, ridding it of crime and disorder. On the other hand, it came at the cost of suppressing both artistic freedom and even basic human urges like sex and swearing. And when Edgar Friendly's anarchist movement got too disruptive (i.e. petty theft of food), he unleashed a dangerous criminal on the populace, causing the death of countless people. That same criminal eventually kills him for his own agenda.
The Dirties: After his and Owen's film for high school about killing their bullies, the Dirties, backfires, Matt decides to shoot a film where both him and Owen kill them for real.
Equilibrium: Father maintains a forced regimen of the anti-emotion drug Prozium on the populace, ostensibly to avoid future global conflicts like the one that drove them into semi-seclusion. Mildly subverted in the end when Father DuPont, lamenting the imminent downfall of his society, admits to Preston that he (Father) does not take Prozium, and thereby is a hypocrite.
Felon: John Smith, the "veterano" character. He took revenge on the guys who raped and killed his family, but first he wiped out their families to "purify the madness" and to show them what the loss feels like. He then became a Death Seeker to end the cycle.
Frankenstein's Castle of Freaks: Count Frankenstein's ultimate goal is a noble one, in that he is seeking to conquer death (and, in the process, ensure that the name Frankenstein lives forever in medical history). However, he is so certain of the rightness of his goal that he willing to take serious ethical shortcuts in its pursuit.
Godzilla and Mothra: The Battle for Earth: Battra (Mothra's Evil Twin of sorts). On the one hand, he's just doing what he was created to do (IE: Maintain balance between man and nature), but he thinks that the only way to keep nature safe is to utterly destroy humanity.
Hot Fuzz: The Neighborhood Watch Alliance of Sandford have been killing off anyone who may lower their chances at getting the "Best Neighborhood" award. Not well-intentioned enough? It's because one of the protagonists' mother committed suicide after the neighborhood didn't win once. One of the villains is the mother's husband and, thereby, said protagonist's father. He always knew that he's his father though, so this is not an example of I Am Your Father.
"If mum could see what you've become, she'd kill herself again!"
Jurassic World: Dr. Henry Wu wanted to make a scientific breakthrough by creating the Indominus rex. However, his plan also involved working with the evil Vic Hoskins to make sure that the project goes through.
Kingsman: The Secret Service: The Big Bad concludes that existing efforts to fix global warming are hopeless, so he decides a simpler solution is to brainwash everyone to kill each other and "cull" the global population to a more manageable number.
Law Abiding Citizen: Gerard Butler's character in the drama/thriller is a textbook example of this. He's a man who saw his wife and daughter murdered by thugs and then watched one of the thugs get off lightly due to a dubious plea deal. This gives him a right to be pissed. And if he had simply botched the execution of one to result in a very painful death and murdered the other, he might manage to be simply an Anti-Hero and still remain sympathetic. On the other hand, murdering every single person connected to the trial in some way with an extraordinarily executed Batman Gambit, and threatening and targeting even their families may be seen as going a little too far.
The Lone Ranger: Latham Cole seems to genuinely believe he's doing the right thing with his actions. Cavendish? Not so much.
Man of Steel: General Zod's coup de etat was provoked by desperation, as he genuinely wanted to remove the ruling council who foolishly mined Krypton's core for energy causing the seismic calamity that ultimately led to Krypton's destruction. He expressed remorse but desperation with his mentor Jor-El. His attempted genocide and terraforming of Earth into Krypton again wasn't inspired by malice towards the humans but a desperate attempt to save the Kryptonian race, as he was bred as a warrior to protect his race.
Zod: No matter how violent, how cruel, every action I take is for the greater good of my people.
Thor: Loki's actions are ultimately for the good of Asgard, but he goes just a bit too far. Everything he does from the middle of the movie on are to show that he's worthy of his father's trust and every bit the equal of Thor. It overlaps with being a little Ax-Crazy, because his plan involves genocide against the warmongering Frost Giants. It's hinted that he's a Not-So-Well-Intentioned Extremist however and that his true goal was more like neurosis over feeling un-loved and alienated in Asgard, exacerbated when he discovers he's not Asgardian but a Frost Giant himself, not to mention feeling jealous of Thor and engineering events to get him exiled, as well as habitually causing mischief like helping the Frost Giants break into Asgard to raid their vault solely For the Evulz.
The World Security Council, Nick Fury's bosses. When the alien invasion begins in Manhattan, the WSC intend to nuke Manhattan to stop the invasion, killing the Avengers and millions of civilians to cut losses.
Captain America initially perceives S.H.I.E.L.D. as this with regards to Project Insight, seeing the ability to launch preemptive strikes across the globe at any time as putting the punishment before the crime. HYDRA is definitely this as they ultimately, and quite genuinely, as shown by Alexander Pierce, wish to create a more orderly and peaceful world, no matter how many people they have to kill to attain it.
Iron Man/Tony Stark. He created the Ultron as a peacekeeping program so all conflict on Earth could be abated, since Tony foresaw (thanks to Scarlet Witch) a future where the Avengers would be crushed by Thanos which did happen. So Tony decided to create a world wide A.I program that would safeguard the Earth even if did neutralizes potential threats before they happen (similar to HYDRA's plan); of course this just bites Tony in the ass as Ultron goes rogue and Tony is forced to destroy his creation before Ultron destroys humanity. Wanda Maximoff aka Scarlet Witch lampshades this when she's convincing Captain America to stop Tony before he creates Vison.
Wanda: Ultron can't see the difference between saving the world and destroying it. Where do you think he gets that from?
Wanda/Scarlet Witch herself. She joined HYDRA to avenge her parents (who were killed by a mortar shell which came from Stark Industries), then teamed up with an evil robot and only stopped being one when her home country was at threat from Ultron.
Ultron himself seems to think that humanity needs to upgrade itself into cyborgs in order to survive any future alien invasions, basically taking the mission programmed into him by Tony to a logical extreme. He plans to do this by raising an entire country off the ground and smashing it into Earth like a meteor, killing hundreds of millions of people and forcing the survivors to upgrade themselves in order to survive the apocalyptic aftermath.
Zemo hates the Avengers because his family was killed accidentally during the battle of Sokovia and like The Government sees the Avengers more of a threat than an ally for humanity, but instead of just trying to destroy them like so many other villains Zemo devises a plan that effectively rips the Avengers apart and sets them against each other. Zemo's morals are skewed, as while he is sympathetic due to losing his family he is still not above killing many innocents to get his revenge, though he does try to commit suicide once his completed his goal; but Black Panther stops him saying the world was not done with him yet.
Tony, by contrast, is also going to extremes in the name of doing the right thing, placing Wanda under house arrest without her knowledge with Vision preventing her from leaving in order to protect her from angry mobs, and refusing to listen to the concerns that Cap and others have about Bucky and the Accords because he thinks that the Avengers need to be held to account and he feels guilty over the actions of Ultron (which were far more his own fault that those of his teammates, so he is clearly projecting). In his mind, he is just doing what is good for the team and trying to prevent Cap and the others from being thrown in jail, but this causes him to ignore evidence that Bucky might be innocent and that a more insidious plot might be in the works.
Doctor Strange: Kaecilius is a delusional psychopath, but his intentions are pure. He seeks to use Dormammu to rid the world of time and ultimately death, a view he gained after his wife and son died. When confronting Strange about it he claims the end justify the means and reveals that Strange's mentor the Ancient One has been using energy from Dormammu's Dark Dimension to keep herself young for decades despite forbidding her students from tapping into that power. This is what caused Kaecilius to reject her teachings and serve Dormamu, however his goals come back to bite him in the ass as gaining immortality is actually a Fate Worse than Death.
Black Panther: N'Jadaka/Killmonger wanted to use Wakanda's Vibranium reserves and technology to create a world where black people will not suffer from racial oppression and neglect. Unfortunately, his plan involved teaming up with Klaue to steal Wakandan weaponry to arm oppressed people all over the world for a bloody revolution, with Killmonger explicitly saying he wanted to target not just his enemies, but also their children
Avengers: Infinity War: Thanos has had a past event where his home planet and race died out due to an Overpopulation Crisis, with him being the only survivor, and wanting to stop this happening throughout the universe. All well and good, until his goal is to murder half of all life in the Universe. He's also been doing this for decades as shown in Gamora's planet.
Gamora: We were happy on my home planet. Thanos: Going to bed hungry? Scrounging for scraps, your planet was on the brink of collapse, I'm the one that stopped that. You know what's happened since then? Children born have had nothing but full bellies and clear skies. It's a paradise. Gamora: Because you murdered half the planet. Thanos: A small price to pay for salvation.
Avengers: Endgame, Thanos has succeeded in wiping out half of life in the universe. Rather than be booming, however, life on Earth is miserable. Yes, nature is improving but the people are unable to move on from the loss of loved ones and society shaken. Thanks to time travel antics, the Thanos of 2014 learns of what is going to happen (including his own death). After coming to the present, Thanos announces that his plans have changed since Earth won't accept his "gift." Instead, he's going to use the Infinity Stones to wipe out the universe and then remake it into one with plentiful resources...and everyone accepting Thanos as totally right. He still holds to the "well-intentioned" part despite the obvious hypocrisy.
In Murder at 1600, it turns out the reason behind the entire murder plot was National Security Advisor Alvin Jordan wanted to force the President to resign because he felt the President was too weak in not going to war with North Korea over a hostage situation and that war was the only way to protect the nation.
Jordan: I think President Teddy Roosevelt said it best: "If I must choose between righteousness and peace, I choose righteousness."
Our Man Flint. The leaders of the Galaxy organization threaten to destroy civilization with their Weather-Control Machine unless the nations of the world disarm. They promise to make the world a paradise if they are obeyed.
The Rock: Brigadier General Francis X. Hummel just wants to get pensions for the widows of soldiers who died on black operations. He's willing to take hostages and threaten to bomb San Francisco with VX gas to do it.
In theSaw movies, Jigsaw claims that his sadistic deathtraps give people an opportunity to truly appreciate what they have by making them fight for it. That the survivors are left emotionally traumatized and usually horrifically mutilated seems to be merely a side effect that he often doesn't care about at all.
Scanners II: The New Order: Dirty Cop Commander Forrester seems to sincerely believe that he's saving society by creating a police state to 'cure' crime, as the city is plagued by violent armed robbers, child killers and drug lawyers. His means of doing this is to keep everyone in line with an army of psychics.
Serenity: The Operative is very extremist but still fits in this category. He attempts to paint himself as Necessarily Evil, however.
The Star Chamber: Judge Hardin is frustrated by having to let obviously guilty murderers Off on a Technicality, and understandably wants them brought to justice. He's inducted into a group of his fellow judges who feel likewise. Their method for doing this, however, involves secretly reviewing the evidence against these accused murderers, voting on whether they're guilty (it's always "yes") and sentencing them to death-via hitman. Still perhaps somewhat excusable, up to the point when it turns out some of the accused murderers aren't, in fact, guilty-and the rest refuse to even try to stop it when Harden says they have to, citing self-interest (they don't have direct contact with the hitman to protect themselves) and the rationalization that they must have done something meriting death. Cue Harden racing against time to save them from said hitman.
Star Trek Into Darkness: Admiral Marcus figured that the exploration-focused Starfleet would not be able to win a war against the Klingons, a war he thought was inevitable. He was only doing what he thought was necessary to ensure humanity's survival. The guy just ends up tapping the Moral Event Horizon when he opts to try and murder Kirk and the entire crew merely for having Khan in their custody, along with other acts.
Most members of the Galactic Empire generally believe that they are the good guys fighting rebel "terrorists".
Count Dooku... for a while, anyway. Word of God (from Lucas and Christopher Lee himself) says that Dooku never quite realized how evil he had become, and, right to the very end, honestly believed that he was doing the right thing. The Expanded Universe has different interpretations of his motivation, though, and the novelization of Revenge of the Sith turns him into a power-hungry racist; this is especially strange because no other source depicts him that way.
Stonehearst Asylum: Lamb, who only wants the patients treated humanely, but is willing to imprison, kill or torture anyone who gets in his way.
Super Mario Bros.: King Koopa, although truly a Bad Boss and a self-confessed "evil egg-sucking son of a snake" dictator who often subjected criminals to De-evolution, had a reasonable motive between wanting to create a Merged Reality between his world and ours by trying to conquer the regular dimension specifically for his species' survival; it's really hard to blame him when his current dimension including Dinohattan is a Crapsack World that lacks various resources like food and water. It also, in a way, humanizes him to a point where he even says he's doing this for the future of his species compared to his second in command, Lena, who really simply wanted to simply rule everything, not caring whether her race benefited or not.
Street Fighter: M. Bison from the 1994 film is a megalomaniacal madman, but he genuinely seems to be thinking that he's performing his Evil Plan for the good of mankind. As he explains in a visionary speech, he wants to create an army of genetic Super Soldiers swearing absolute obedience to him. Then by conquering the world he can do away with conflicts based on race, nation, or creed, and everyone can live peacefully under his dominion.
Swordfish: Gabriel Sheer claims to be a necessary instrument to fight terrorists and has no qualms about going after civilians to achieve his goals.
Training Day: Some of Alonzo's actions can be interpreted this way. He's a veteran police officer with a very high success rate on closing cases and is working a staggering number of them at any one time while supervising multiple younger officers, but his methods are generally brutal and extralegal. Others, such as his murder of a drug dealer friend of his so he can steal his money or putting out a hit on the main character to keep him from talking, not so much.
Transcendence: Bree and the rest of RIFT are convinced that artificial intelligence will mean the end of humanity, and orchestrate a country-wide attack on labs doing such research in the opening. Later on, Will honestly believes he can help improve humanity, but isn't really asking permission to do it.
The Truman Show: Christof sees the real world as a place of pain and misery, so he traps his adopted son Truman in a fake world where everyone he knows is an actor, so that he won't have to face reality.
The Warlords: Jet Li's character started out as a straight hero until the half way mark, when he had to decide how to provision his limited supply of food. He had enough to feed his army for 10 days, but if he shared it with the army that had just surrendered to him, there wouldn't have been enough food for anyone to live. His solution: massacre the enemy army. He remained well intentioned and acted in the interests of the greater good, but his methods remained unsavory.
White House Down: Walker, Speaker of the House wants to nuke the Middle East with the nuclear football and ultimately end the war, but his methods are too extreme. The reason was because his son was killed in a botched CIA attempt, so he caused the events of the movie.
The World's End: The Network just want humanity to reach its full potential. They only want to kill as many as they have to in order to ensure that... Unfortunately, it turns out to still be an awful lot of killing, because humanity doesn't like being told what to do.
Magneto has always been the archetypal example in comics and the films faithfully live up to that. His plan in X-Men, is actually rather benevolent and would finally end the division between Mutants and the rest of Mankind, while sacrificing only Rogue to make it work. It's a good plan, it's just a shame his machine doesn't work! Still, Xavier desiring to stop him is apt for someone with his point of view (that is the world is fine as it is, it's everyone living in it that needs to learn how to get along with things as they are and accept everyone for their differences).
Mystique, along with Magneto.
William Stryker. At least he tries to present himself as this, but mostly comes off as Fantastic Racism.
In X-Men, Senator Kellys desire to introduce a Mutant Registration Act is born out of fear for others, and such fear isn't entirely unfounded.
Both Warren Worthington II and Dr. Kavita Rao, who just want to help people who society views badly.
Psylocke, Kid Omega and Callisto. Like the other Omegas, who want mutant rights but have crossed the line into mutant superiority.
Shingen Yashida from The Wolverine. In his eyes, at least, he's just trying to save the Yashida Clan from being disgraced at the hands of his "weak" daughter.
In X-Men: Days of Future Past, Magneto, Mystique, and Trask all want to do what's best for their people. All three of them are willing to go to any lengths to accomplish this. Trask is an interesting case in that he is not motivated by the typical villain desires of money or power, but he genuinely believes that fighting the mutants will unify humanity and end such conflicts as the Cold War.
Dark Touch: Niamh wants to prevent any children from being abused. First, she kills the clear abusers. Then, she makes sure that the other children die before they can be abused, or abused further. Then, she kills the people who took her in because they might be abusive. Then, she decides to move on to other targets...