When the Heffley family attends a pool party at the local pool to start off the summer, Greg (Zachary Gordon) is found playing Twisted Wizard 2 on his PSP. The family meets a former trouble-making friend of Rodrick who is now a model student after attending a military school known as Spag Union. Greg's father, Frank (Steve Zahn) wants him to do something outdoors by swimming. Manny (Connor & Owen Fielding) calls Greg over to the baby pool. He laughs and says he is peeing. After Greg watches other toddlers urinating in the pool, to his horror, the show begins with Greg speaking to the audience about summer and that he and Frank have nothing in common. But at least if he stays a step ahead, Greg claims, he will have a shot at a great summer.
On the last day of school, when last period almost ends, Greg attempts to get his crush Holly Hills (Peyton List) to put her phone number in his yearbook in addition to signing it. However, she is forced to leave with Patty Farrell (Laine MacNeil) before she can write the last two numbers. The school hallway is a zoo. While Greg finally makes it out, Greg attempts to ask Holly to finish, but she sees her sister before she can finish his request. A car comes by, and Holly is forced to leave for a ride. Meanwhile, Rodrick (Devon Bostick), who is advertising his band at Greg's school, falls in love with Holly's older sister, Heather Hills (Melissa Roxburgh).
On the first day of summer vacation (while Greg's dad is out), Greg plays "Twisted Wizard 2" all day on the 360. When his dad comes home, he finds the game is still playing. Having Rodrick laughing, Frank takes off the plugs off of the TV and the video game system. But Greg's mother, Susan (Rachael Harris) tells him not to unplug the TV and the video game system, and to spend more time with Greg because Frank always said that his father didn't spend much time with him when was a boy, and also, she doesn't want him to take away everything Greg and Rodrick love and disappear downstairs to work on his Civil War battlefield diorama. Because Holly's phone number is missing the last two numbers, Rowley and Greg tries to call every possible two numbers. Unfortunately for him, he never receives an answer from Holly. Later, Susan makes a book club called "Reading Is Fun." Sometime later, Greg's best friend, Rowley Jefferson (Robert Capron) takes Greg to the local country club, which Greg initially just uses to get away from Reading Is Fun, but he takes a liking to it instantly due to the seemingly free food, the sparsely populated pool, and the fact that Holly teaches tennis there. While at the club, he arranges a tennis match the next day despite the fact that he and Rowley have never played real tennis. When Greg returns home, he finds his father has offered to sign him up for an internship at his job, but Greg makes up a hasty lie about having a job at the country club to get out of it and to go to the country club every day. The next day at the tennis match, it becomes painfully obvious that Greg and Rowley have never played tennis, and Holly teaches Greg personally.
At a party at Warren's, Greg's dad decides to get a dog for the family and to sign Greg up in the Wilderness Explorers (a parody of the Boy Scouts of America) to teach him responsibility after hearing it worked with Warren's sons. At the same party, Rodrick finds out that Greg does not have a job, and tells Greg that he will not reveal Greg's secret to his parents if Greg will take Rodrick to the country club to see Heather. Greg reluctantly agrees, and Rodrick attempts to make Heather fall in love with him, though his attempt to do so ends horribly. Later that day, Frank gets a new dog. Greg wants to name the dog Shredder or Ripjaw, but the names are too violent. Then Manny names the dog "Sweetie", who proves to be a handful after being walked through the town.
Rowley invites Greg on a family trip to their beach house near the Boardwalk. Just before Greg leaves, his parents give him a "Ladybug" cell phone (a parody of the Firefly phone), which only allows him to call home and 9-1-1. Greg sees that the house that they are staying at is far away from the boardwalk. The Jeffersons play a game of "I Love You Because." When Greg has to compliment Mr. Jefferson (Alf Humphreys), he has no idea what to say. (He might have eventually answered, but whatever else he had to say is skipped). When they visit the amusement park, Greg convinces Rowley to go on the Cranium Shaker despite Rowley's conservative parents telling them to not go on scary rides and to meet them back in one hour. Rowley feels nervous since he had promised his parents. They get on the ride, and it is not a pretty sight. At the end of the ride, Rowley's parents find out, and they tell Rowley that they were searching everywhere and they were about to call the police to report him missing. Rowley feels guilty when they tell him that they are disappointed in him. At home during bedtime, he hates the sleeping situation, and Greg attempts to email his mother asking her to help him leave while Mr. Jefferson uses the restroom, but he accidentally emails everyone on Mr. Jefferson's contact list. Panicking, the next morning, when Mr. Jefferson finds out about the email Greg sent and ends up with 949 emails, Greg tries to escape by calling his parents using his Ladybug, but when he pushes the house button, the phone tells him that it cannot take his call. He tinkers with the phone, but he then accidentally presses the 911 button. The police arrive and attack Mr. Jefferson for having a knife in his hand. Greg is then sent home early, and Frank tells him that Rowley is a bad influence because Greg always gets into trouble around him.
Later, when Greg asks Rowley to take him again into the Country Club, Rowley lies and states he is not going there. Still, Greg sneaks in, pretending to be a member of the Jefferson family. He even impersonates a golf tournament champion named Roland Gropper when there's a new receptionist. After falling from the high dive, Greg is cut from the board's edge and feels foolish because he wades naked next to Holly and a little girl throws his suit somewhere he can't reach (a pole) so he finds pink pants and walks out in those. Greg runs into Holly and Heather (after putting his shorts back on) meets Rowley, who tells him he had lied to protect Greg's feelings because his parents didn't want to. He and Greg make up, however Rowley's father becomes infuriated that Greg has built up a massive smoothie bill because he did not know people get charged for whatever people order at the country club and Frank finds out Greg does not have a job and is forced to pay himself. Greg's real identity is revealed to the manager and the new receptionist. Much to Greg's horror, he and Rodrick intercept a promotional package DVD from Spag Union directed to his father, and Greg fears that he is going to be sent there.
Rodrick tells Greg about the "Wilderness Weekend", where he can attempt to impress his Dad while out on a camping trip. Greg, hoping this may be his last chance to impress his Dad, goes there. However, their troop proves to be weak compared to Troop 42, led by their exercising freak of a neighbor, Stan Warren (Phil Hayes), who pitch their tents where Greg's troop was about to stay, forcing them to put their tents next to the bathroom. Greg and his friends overhear Stan and his sons mocking Greg's father and plan to set up a trap for revenge by putting a nest of ants in their sleeping backs and a sticky, honey-coated net. The net succeeds, but barely Greg escaped Warren while getting the ants on his hand. However, Warren's expensive tent gets destroyed, and Greg discovers that Troop 42 has not been camping but living off of excessive conveniences. When Greg steps up and takes the blame, defended by his three loyal friends, Frank is impressed and finds out about Troop 42's electronic convenience. Frank angrily confronts Warren as a phony, and Warren falls into the honey coated net that Greg, Rowley, Fregley (Grayson Russell), and Chirag (Karan Brar) made. As a result, Warren is chased by bees and a bear. Frank later takes Greg to a hotel and reveals he never liked camping. He tells Greg that he will not send him to Spag Union and that he is proud of him.
At Heather Hills' Sweet 16th birthday party, Löded Diper performs a rock version of Justin Bieber's "Baby" during an attempt to win over Heather. However, they end up ruining the party and humiliating her in the process. Greg apologises to Holly, however she states she is happy as she felt that Heather deserved it. Then Holly holds Greg's hand, implying that she likes him. The film ends with Greg, Rowley, and Holly swimming at the community pool with Greg and Holly hugging and the Heffleys eating hotdogs enjoying the rest of the summer.