

The main villain dies by their own fear.
Hopper (A Bug's Life)
Sometime after the mechanical bird fails and the ants revolt, Flik tricks Hopper into leading him to a bird's nest. When the bird appears, Hopper thinks it's another fake, but the moment it roars, he realizes he's in deep shit. He tries to run away, but the bird ends up grabbing him and takes the grasshopper to its little ones, where they proceed to chow down on him.
Lord Shen
(Kung Fu Panda 2) When Shen finds out from a fortune teller that "A warrior of black and white" was going to take everything from him, he sets out to destroy the one animal species that was colored black and white, the pandas. In the film's climax, Po defeats Shen and destroys his armada of cannons, but doesn't kill him right then and there, choosing to help him instead. Shen, wanting nothing more but to kill Po, attacks him once again and tries to slash him, and the battle ends with him being crushed by his own cannons, which proceed to go off with him underneath them.