Gru, a super-villain, has his pride injured when an unknown super-villain steals the Great Pyramid of Giza, an action that is described by his colleague Dr. Nefario as "making all other villains look lame." Gru decides to do better, with the assistance of Dr. Nefario, by shrinking and stealing the moon, an idea based on his childhood dream of being an astronaut, which was always discouraged by his mother Marlena. The plan is expensive and Gru seeks a loan from the Bank of Evil, where the president Mr. Perkins is impressed by the plan, but will only provide the money if Gru can obtain the necessary shrink ray first.
Gru and his minions steal the shrink ray from a secret base in Asia but the up-and-coming super-villain, Vector, who was also responsible for the Pyramid theft, immediately steals it from Gru, as revenge for freezing his head earlier. Gru attempts to break into Vector's fortress to get the shrink ray back but is defeated by numerous booby traps. However, he notices three orphan girls, Margo, Edith, and Agnes, are able to easily walk into the base because they are selling cookies. Gru, faking his credentials as a dentist, adopts the girls from Miss Hattie's Home for Girls, planning on using them to infiltrate Vector's base so he can get the shrink ray back. Nonetheless, Gru has difficulty nurturing them properly due to their rambunctiousness, their ballet classes, and his own ineptitude as a parent.
Eventually, Gru and the girls arrive at Vector's fortress and Gru manages to steal the shrink ray. The girls then suggest a day at a theme park; Gru agrees, believing he can abandon the girls there but he is later told by an attendant that they must be accompanied by an adult. He is then dragged around the theme park for the day, eventually warming to the girls after they compliment him on blowing up a rigged carnival game.
Later, Gru contacts Mr. Perkins, stating that he finally has the shrink ray in his possession. Margo, Edith, and Agnes interrupt the meeting, and Perkins announces that he has lost confidence in Gru and will no longer fund his operations. As Gru tells the minions about the bad news, the girls offer the contents of their piggy bank to fund the plan. His minions then hand over their own savings. Gru, inspired, sacrifices parts of his lair to construct a spacecraft. Gru plans to steal the moon when it is nearest the Earth but this ends up being the same day as the girls' ballet recital. Gru becomes conflicted and Dr. Nefario, seeing this as interfering with the plan, arranges for the girls to be returned to the orphanage. At the same time, Mr. Perkins informs Vector (who is revealed to be his son) of Gru's possession of the shrink ray and the adoption of the three girls, encouraging Vector to take action.
Gru successfully shrinks and steals the moon, but is too late to attend the recital — finding a note from Vector, who has kidnapped the girls, and will exchange the moon for them. After arriving at Vector's headquarters, Gru readily makes the trade, but Vector reneges on the deal, flying off with the girls and the moon, much to Gru's anger. Meanwhile, Dr. Nefario has discovered that the effects of the shrink ray are temporary; the bigger the object was originally, the faster it will regain its original size. As the moon starts to expand in Vector's ship, Gru, Dr. Nefario, and the minions pull off a daring mid-air rescue of the girls just as the moon explodes out of Vector's ship and launches itself back into orbit, with Vector trapped on it.
Some time later, Gru has readopted the girls and treats them as his daughters, writing them a bedtime storybook framed around his own experience. The film ends with the girls performing their own ballet recital for Gru, Marlena, Dr. Nefario, and the minions.