A secret laboratory near the Arctic Circle is stolen by a mysterious vehicle using a giant magnet. The Anti-Villain League (AVL) recruits former super-villain Gru, now a devoted father to Margo, Edith and Agnes, to find out which evil person stole the lab, which contained a powerful mutagen known as PX-41 which can make indestructible and extremely aggressive monsters out of living organisms because Gru, being an ex villain knows how villains work but refuses. Gru learns that Dr. Nefario, his friend and assistant, has decided to leave him for new employment, because he "missed being evil." Gru reluctantly partners with undercover AVL agent Lucy Wilde, and together they search The Paradise Shopping Mall, where they are given a bakery called "Bake My Day" as their headquarters. Gru suspects Mexican restaurant owner Eduardo Perez of being a super-villain called "El Macho", a bad guy who became Gru's inspiration for a villain who supposedly died after skysurfing a TNT-laden shark into the center of an active volcano. Gru and Lucy break into Eduardo's restaurant at night, but only find a jar of secret-recipe salsa and nothing to prove that Eduardo is the culprit. Meanwhile, Agnes expresses her wish of having a mother someday and suspects that Gru will fall in love with Lucy. Gru tells her that his relationship with Lucy is strictly professional.
Gru and Lucy investigate wig merchant Floyd Eagle-san, but Gru is still suspicious of Eduardo. After the investigation, Gru is set up on a horrible dinner date with a woman named Shannon, who notices Gru's wig and threatens to humiliate him. Luckily, Lucy bumps into them and rescues him from the date by shooting Shannon with a tranquilizer dart. They take Shannon home, and after they say good night, Gru realizes that Agnes was right: he has romantic feelings for Lucy.
The next day, the AVL arrests Floyd Eagle-san (who claims that he was framed) because an almost-empty mutagen jar was found in his shop. The investigation is closed, and Lucy is reassigned to Australia. Before leaving, Lucy gives Gru her lipstick taser to remind him of her. This leaves Gru heartbroken because he loves her, but he cannot find the courage to ask her out on a date. Instead he brings the girls to Eduardo's Cinco de Mayo party and finds proof that the Mexican restauranteur is in fact the super-villain El Macho. Gru discovers that he (and his helper, Dr. Nefario) have captured and mutated a large number of Gru's minions using the PX-41, turning them into insane, savage purple-furred monsters. El Macho plans to send rockets full of mutated Minions to major cities and achieve world domination. El Macho emphasizes that he and Gru could team up and they would become evil again followed by ruling the city, but Gru avoids answering and leaves with his daughter Margo, who in the meantime has broken up with Eduardo's two-timing son, Antonio, who had left Margo for another girl. For breaking Margo's heart, Gru uses his freeze-ray to freeze Antonio in a block of ice.
On her flight to Australia, Lucy realizes she has feelings for Gru, so she jumps out of the plane and hang-glides down to the party. She is captured by El Macho, who knows she is an AVL agent after Pollito, his pet chicken, retrieves her AVL ID badge from her purse. Fortunately Dr. Nefario lets Gru know what is happening. In order to rescue Lucy, Gru visits El Macho along with two minions covered in purple cupcake frosting, pretending he was captured by two of the mutant creatures. Fighting alongside his daughters and Dr. Nefario, Gru and his team spray all of the mutated minions with awful-tasting jelly containing a powerful antidote that Dr. Nefario made, whereupon they revert to their friendly yellow state. El Macho then takes the mutagen himself, but Gru and Dr. Nefario easily overcome him using a fart gun and Lucy's lipstick-taser.
Lucy is, however, already strapped to a TNT-loaded shark rocket. Gru starts to untie her, but the rocket-launch remote button is pressed by El Macho's pet chicken Pollito. The rocket flies towards the same lava-spewing volcano where El Macho had previously faked his death. Lucy accepts Gru's invitation for a date, and the pair dives into the safety of the ocean seconds before the rocket enters the volcano.
One hundred and forty-seven dates later, Gru and Lucy are married and Margo, Edith and Agnes finally have a mother. The minions close with a rendition of "I Swear" (sung in minionese as "Underwear") and "Y.M.C.A" while the whole family dances. Then, a purple furry minion shows up, surprising the family.