*Warning* Spoiler Alert
If you're unfamiliar with the films, both Despicable Me and Megamind are films about Super-Villains, both of whom aren't the most successful villains in the world, that eventually, for the good of those they care about, see the light and become the "good guys", in the process defeating the greater evil.
In Despicable Me (the first feature from Chris Meledandri's Illumination Entertainment) the main character, Gru, changes his ways to become a father to 3 orphaned girls (not dissimilar to The Pacifier). Whereas, in Megamind, the main character (Megamind) falls in love with the stereotypical Lois Lane rip off, Roxanne Ritchie (even down to the alliterative name) and rises up against a super-powered monster, of his creation, becoming the good guy in the process.
Personally I prefer Despicable Me's reasoning, it's more emotional and just a bit deeper, whereas Megamind's story feels like it's been done before.
Another area of note is the voice acting, in Despicable Me, it's hard to tell who anyone is, Gru does not sound like Steve Carell, Dr. Nefario doesn't sound like Russell Brand and Vector doesn't sound like Jason Segel, the characters are interesting and original. However, in Megamind, whilst all of the characters are really funny (I particularly liked Minion), you can instantly tell who's who, Will Ferrell is instantly recognisable as Megamind etc..., however he still turns in a great performance.
But, overall, I preferred the characters in Despicable Me, they just felt more original, however the side characters in both films were some of their best qualities, the Minions in Despicable Me and Minion in Megamind (notice a similarity there?).
All in all, I preferred Despicable Me for its originality and the extra subtlety it showed in its voice cast compared to Megamind, however I was really impressed with both films and enjoyed them both really much.