Megamind (Will Ferrell) is a super-intelligent alien who—at the age of eight days old—is sent to Earth by his parents as his home planet is destroyed by a black hole. However, he lands in The Prison for the Criminally Gifted, thanks to another infant alien similarly sent from a different planet who eventually becomes a superhero known as Metro Man (Brad Pitt), defender of the fictional Metro City. As a result, Megamind is raised as a social deviant, who is neglected for his destructive intellect, with his fish-like sidekick Minion (David Cross) as his only friend. Realizing that he is only gifted in causing trouble, and jealous of all of the attention young Metro Man receives, Megamind becomes a supervillain to rival Metro Man, though he is thwarted on a regular basis. During one of his many attempts to defeat Metro Man, Megamind kidnaps news reporter Roxanne Ritchi (Tina Fey) and uses her as bait to lure Metro Man into the city observatory where Megamind intends to kill him with a death ray. The plan appears flawed enough for Metro Man to escape, but he proclaims that the inside of the observatory is lined with copper, which he says drains his power. Metro Man is then seemingly killed by the death ray. Megamind is initially happy that he has defeated his archenemy, but soon grows depressed over the fact that without someone to fight, his life as a supervillain no longer has any purpose.
Megamind talks with Roxanne while disguised as a museum curator named Bernard and is inspired to create a new superhero to fight using a serum of Metro Man's DNA. Hoping to uncover any evil plans Megamind has for the city, Roxanne breaks into Megamind's lair and fights with him over a syringe gun containing the serum, which is accidentally fired and injected into Roxanne's cameraman Hal Stewart (Jonah Hill). Megamind manipulates Hal into becoming a superhero named Titan (although Hal misspells it 'Tighten'), but at the same time falls in love with Roxanne and begins dating her while disguised as Bernard. Titan attempts to use his powers to woo Roxanne, but is quickly spurned and grows jealous of the Bernard-disguised Megamind. Megamind soon begins having second thoughts about being a villain, finding more enjoyment pursuing a relationship with Roxanne. He then gets in a fight with Minion and the two friends have a falling out. After kissing "Bernard" on a date, Megamind's identity is accidentally exposed and Roxanne rejects him, saying she could never be with him. Heartbroken, Megamind follows through with his plan to fight Titan. By this time, however, Titan has decided he would rather be a supervillain since, in his view, being a superhero is too much hard work. Unlike Metro Man, Titan has no qualms with outright killing Megamind, especially when he reveals himself to be "Bernard" and he is forced to flee for his life. With nobody to stop him, Titan begins wreaking havoc in Metro City.
Noticing how one of his copper-based attacks during the fight had no effect on Titan, Megamind convinces Roxanne to search for clues on his weakness in Metro Man's old hideout. There they discovered that Metro Man is still alive and learn that he faked his death (and his weakness to copper) so that he could retire from being a superhero and live his true passion: music. Megamind and Roxanne try to persuade Metro Man to defeat Titan, but he refuses and instead Megamind turns himself in. When Titan kidnaps Roxanne, however, Megamind is broken out of prison by Minion and goes to save her. Megamind defeats Titan by draining Metro Man's DNA from his body, stripping him of his powers, and Hal ends up in Megamind's former prison cell while Megamind is embraced by Metro City as its new defender. Roxanne accepts Megamind just as he is after he proves himself a true hero. Megamind begins to enjoy his new reputation as a superhero and Roxanne's beau while a disguised Metro Man silently congratulates him.
A post-credits scene shows Minion doing the laundry then Bernard pops out of the washing machine claiming that this was the worst day of his life, Minion then responds and whacks him with a forget-me-stick.
- Will Ferrell as Megamind, the film's protagonist.
- Tina Fey as Roxanne Ritchi, Megamind's love interest.
- Jonah Hill as Hal Stewart/Tighten, the film's antagonist who starts out as the hapless cameraman of Roxanne Ritchi, whom he has unreciprocated feelings for.
- David Cross as Minion, a sapient talking fish who is Megamind's sidekick.
- Brad Pitt as Metro Man, Megamind's archenemy.
- Justin Long as Brainbots, Megamind's robotic assistants possessing many talents, including flight, light display, and others.
- Bill Hader as Bob Prickles, Metro Man's adoptive father with a somewhat uninterested tone of voice
- Amy Poehler as Linda Prickles, Metro Man's adoptive mother with a sarcastic enthusiasm for her adoptive son's arrival
- Andrew Sego as Random Citizen
- J. K. Simmons as Warden, the no-nonsense head of Metro City Prison.
- Ben Stiller as (the real) Bernard, a museum curator.
- Justin Theroux as Megamind's Father who tells his son he is destined for greatness (the last word is unheard by baby Megamind, however)
- Christopher Knights as Prison Guard
- Tom McGrath as Lord Scott / Prison Guard
- Jack Blessing as Newscaster
- Jessica Benia as Megamind's Mother
- Joey Dinitere as Baby Megamind
- Noah Dinitere as Baby Metro Man