A mysterious ship using a giant magnet steals a highly potent mutagen known as PX-41 from a secret laboratory in the Arctic Circle. The Anti-Villain League (AVL), led by Silas Ramsbottom, sends one of its agents, Lucy Wilde to recruit Gru, a former supervillain. At the AVL headquarters Silas tells him he was taken here to track down the culprit of the person who stole the lab and recover the mutagen. However, Gru refuses, claiming that he is now a legitimate father and jelly businessman. Longing to resume his criminal life, Dr. Nefario, Gru’s friend and assistant, leaves Gru for new employment. This convinces a reluctant Gru to investigate the theft and work with Lucy.
The pair begin their search in the Paradise Shopping Mall, disguised as bakery employees. Gru immediately suspects a Mexican restaurant owner, Eduardo Pérez, of being the infamous “El Macho”, a legendary super-villain who supposedly died by riding a shark into an active volcano with 250 pounds of dynamite strapped to his chest, though his body was never found. Gru and Lucy break into Eduardo’s restaurant at night but find no proof. Meanwhile, Agnes, who dreams of having a mother one day, believes that Gru will fall in love with Lucy. Gru denies it, saying his relationship with Lucy is only professional.
Despite holding Eduardo as his prime suspect, Gru agrees to pursue others, including wig merchant Floyd Eagle-san, where he discovers traces of PX-41. After witnessing Eduardo’s two-timing son, Antonio, woo Margo and invite everyone to his Cinco de Mayo party, Gru renews his focus on Eduardo. His neighbor, Jillian, sets him up on a dinner date with her opinionated friend Shannon. The date goes awry, but Lucy arrives and rescues Gru from being humiliated by shooting Shannon with a tranquilizer gun. While they take Shannon home, Gru and Lucy spend personal time together, and Gru falls in love with her.
The next day, the AVL arrest Eagle-san after finding an almost-empty jar of the mutagen in his shop, and the investigation is closed by Ramsbottom. Lucy is reassigned to Australia and gives Gru her lipstick taser as a gift before leaving. A heartbroken Gru, having lacked the courage to ask Lucy out on a date, instead takes the girls to the Cinco de Mayo party. There, he follows Eduardo and discovers a secret musical steps-activated elevator, where he finally discovers that Eduardo is indeed El Macho as he suspected.
On her flight, Lucy, realizing that she has also fallen in love with Gru, jumps out of the plane and uses a hang-glider to reach the party. Gru discovers that El Macho, who has hired Nefario as a partner, has been abducting Gru’s minions and using the stolen PX-41 serum to make them rabid and indestructible. El Macho plans to launch rockets full of the mutated Minions into major cities in order to dominate the world. He offers Gru the chance to team up with him, but Gru walks away and El Macho sends one of his minions after him.
Gru takes the girls home and finds a heartbroken Margo as Antonio has chosen another girl to dance with other than her; Gru freezes him on the way out. Lucy later arrives at the party right after Gru leaves, but El Macho captures Lucy after Pollito, El Macho’s pet chicken, retrieves her AVL ID badge from her purse. Nefario rejoins Gru and tells him that Lucy has been captured, Gru goes back to his fortress with two of his own minions. Meanwhile, back at Gru’s house, the minion that El Macho released finds his home and attacks the girls, but Nefario comes to their rescue as he had created an antidote to the serum and pours it in their jelly reserves. Gru arrives at El Macho’s fortress with two disguised minions covered with purple paint pretending to be captured, but their cover is blown and the purple minions attack and corner them. Luckily, Nefario, the girls, and the rest of Gru’s minions arrive with the antidote on Gru’s aircraft and return all the Minions to their normal state. El Macho then applies the mutagen on himself and turns into a monster, but Gru and Nefario defeat him using Lucy’s lipstick taser and a fart gun respectively.
Gru finds Lucy strapped to a TNT-loaded shark rocket and starts to untie her, but Pollito launches the rocket, sending it flying towards the same volcano where El Macho previously faked his death. Lucy accepts Gru’s invitation for a date, and the pair dive into the ocean seconds before the rocket enters the volcano and explodes. Gru joins the AVL, and he and Lucy eventually get married, giving Margo, Edith, and Agnes a mother.