Here's some ones i can think of.
DCAU Lex Luthor stopped Amazo from destroying the world and defeated Darkseid.
Spike in Buffy The Vampire Slayer sacrificed his life to save the world in the series finale.
In a rare example of a pure evil villain doing this Angelus in Angel brought the sun back by killibg the beast thogh for selfish reasons.
Venom in marvel comics saved the world several times.