Felonius Gru and his wife Lucy, agents for the Anti-Villain League (AVL), are tasked with capturing Balthazar Bratt, a former child actor who turned to villainy when his show was cancelled as a result of his puberty. Due to their repeated failures in detaining Bratt, Gru and Lucy are fired by the new head of the AVL, Valeria Da Vinci, following Silas Ramsbottom's retirement. Soon afterwards, most of Gru's Minions leave him when he refuses to return to villainy.
The following morning, Gru and his family are approached by Fritz, the butler of Gru's long-lost twin brother Dru, who lives in Freedonia and longs to meet him. Gru's mother, Marlena, explains that when Gru and Dru were infants, she and her husband split apart, each taking one child with them. With this information, Gru, along with Lucy and their daughters, Margo, Edith and Agnes, travel to Freedonia and meet Dru. While Lucy and the girls explore Freedonia, Dru reveals to Gru that their father was a legendary supervillain. Due to being dismissed as a failure by their father, Du hopes Gru will teach him how to be a villain, but Gru refuses. Meanwhile, the Minions are arrested after trespassing on a talent show set, and Bratt manages to steal an expensive diamond, which he intends to use to power a giant robot to destroy Hollywood in revenge for cancelling his show.
While exploring Freedonia, Margo catches the unwanted attention of a boy named Nico, while Edith and Agnes stumble into a tavern, where the bartender tells them that a mythical unicorn lives in a nearby forest, encouraging Agnes to go looking for it. Arriving in the forest, Edith and Agnes instead find a one-horned goat, which Agnes dubs "Lucky" and takes instead. Meanwhile, Gru, having learned that Bratt has stolen the diamond, convinces Dru that the two should steal the diamond for one last heist, with Gru secretly planning to bring it to the AVL, so that he and Lucy can get their jobs back. The brothers infiltrate Bratt's lair and manage to retrieve the diamond before being picked up by Lucy. However, Dru becomes upset upon realizing Gru's true motives for taking the diamond, leading to a falling out between the two brothers. Gru decides to leave Dru's mansion, but before he can, Bratt, having disguised himself as Lucy, abducts the girls and retakes the diamond, forcing Gru, Dru and Lucy to pursue them.
Using his robot, Bratt wreaks havoc across Hollywood. While Lucy rescues the girls, Gru and Dru attempt to stop Bratt. However, Gru is knocked unconscious during the fight. Dru manages to destroy the robot's core, disabling the robot. Gru regains consciousness and battles Bratt, managing to defeat him with Bratt's own keytar. The Minions, who had escaped from jail and gone looking for Gru, arrive at Hollywood, where they destroy the gum covering the city. Bratt is taken into custody and Gru and Dru reconcile.
Soon afterwards, Gru and Lucy are reinstated in the AVL and the family celebrates at Gru's house. Lucy is acknowledged by the girls' as their mother. However, Gru and Lucy discover that Dru, who still yearns to be a villain, has stolen Gru's ship, accompanied by the Minions. The two decide to give Dru a five-minute head-start before engaging pursuit.