Former villain Gru is now an agent for the Anti-Villain League (AVL). He and his partner and wife Lucy Wilde are sent to foil the plans of Balthazar Bratt, a former child actor from the 1980s that turned evil after his TV show, “Evil Bratt”, got cancelled due to Bratt hitting puberty. Gru manages to stop Bratt from stealing the Dumont Diamond, a giant pink diamond, but is unable to capture him. As a result of failing to capture Bratt, Gru and Lucy are dismissed from the AVL by its irrational new director Valerie Da Vinci, following the retirement of the AVL's former director, Silas Ramsbottom.
When Gru and Lucy return home, Gru and Lucy reluctantly tell their kids, Margo, Edith, and Agnes, of their dismissal, but assure them they will find new jobs. Most of Gru's Minions leave him when he refuses to return to villainy despite losing his job and the fact that his old sidekick Dr. Nefario had accidentally frozen himself in carbonite, with only two Minions named Dave and Jerry staying due to them not being there when the others leave with their new leader, Mel. Meanwhile, Lucy struggles to adapt to her new role as the children's new mom. The next morning, when a butler named Fritz arrives at the Gru house, Gru discovers that he has a twin brother named Dru, who lives in a distant country named Freedonia, who longs to meet him. Shocked to learn he has a twin, Gru confronts his mother, who reveals that shortly after they were born, she and her husband got divorced, they each took one son to raise on their own and promised never to see each other again. The family decides to travel to meet Dru, and they are surprised at his immense wealth, and the size of the mansion, which Fritz attributes to their pig farm business. Meanwhile, the Minions are arrested for trespassing at a talent show set, shortly after they finish performing. Bratt manages to steal the diamond again, intending to use it to power a giant robot and destroy Hollywood as revenge for having his show cancelled.
Dru reveals to Gru that their recently deceased father was a legendary super-villain known as "the Bald Terror", whose villainous activities are the real source of the family's wealth. As Dru was dismissed by their father as a disgrace, he asks his brother to teach him how to be a villain. When Gru refuses to revert to his old ways, Dru takes him on a joyride around Freedonia in their father's technologically advanced car and the siblings bond. Meanwhile, Lucy tries to balance her new tasks as a mom, which she exhibits after turning away a young boy named Niko who had fallen for Margo in the midst of a traditional cheese festival, while Edith and Agnes stumble into a local tavern and learn from the bartender about a mythical unicorn which lurks in a nearby forest. Gru tries to convince Agnes that unicorns are imaginary, but decides against it to avoid hurting her feelings. The next day, Agnes and Edith set out into the woods to track the mythical 'unicorn', only to find a one-horned goat whom Agnes adopts and dubs "Lucky". Meanwhile, the Minions' longing for Gru motivates them to escape from prison and return to their former master.
Gru convinces Dru to steal the diamond, with Gru secretly intending to bring it to the AVL, which he hopes will convince Da Vinci to rehire him and Lucy. Despite several setbacks, they manage to retrieve the diamond and are rescued by Lucy after narrowly escaping. After finding out Gru's true motives, Dru confronts his brother about his lie. In return, Gru insults Dru's incompetence and decides to leave Freedonia, ending their relationship. Bratt, disguised as Lucy, kidnaps the children, and once again acquires the diamond. Gru and Dru resolve their differences and pursue him after finding the real Lucy.
With his robot powered by the diamond, Bratt terrorizes Hollywood, intending to send it into space with the use of superpowered gum. Lucy saves the children while Gru and Dru weaken Bratt's robot with the weapons of their father's car. Gru is knocked unconscious when the car is destroyed, and Dru manages to destroy the robot's core from the inside when Bratt threatens to kill Gru. When Gru recovers, he battles Bratt in a dance fight, using it as a distraction to grab his weaponized keytar, and defeats him. Having rendezvoused with Gru, the Minions manage to destroy the gum already covering the city, and Gru and Dru reconcile.
Soon afterward, Gru and Lucy are reinstated in the AVL and the newly united family celebrate in Gru's home. Lucy is acknowledged by the children as their mother. Lured back to villainy, Dru, along with most of the Minions, steals Gru's aircraft, with Gru's emblem replaced with a "D" graffiti. Gru and Lucy decide to give them a five-minute head-start before engaging pursuit.