Surly Squirrel is loved by Liberty Park’s Urban wildlife community and oversees an all-you-can-eat buffet at Maury’s Nut Shop. This worries Andie, as she has a more hard-working outlook on life than Surly. Mole accidentally blows up the nut shop after he forgets to reduce pressure from the boiler. Andie suggests returning to their roots by foraging for food in Liberty Park as Surly and Buddy fail to find other food-packed places. Defeated, he and Buddy return to the park.
Concerned that Liberty Park never makes money, Percival J. Muldoon, the unscrupulous Mayor of Oakton City, decides to turn it into an amusement park named Libertyland. Surly and Andie discover Muldoon’s plot, and Surly convinces the animals to sabotage the construction workers’ efforts to tear down the park.
Surly’s enjoyment is short-lived; Andie attempts to convince the animals to work hard for food, which Surly believes can result in disappointment. When the construction workers’ foreman tells Muldoon about the animal attacks, he calls an animal extermination squad led by Gunther. Surly becomes caught in one of Gunther’s traps, and the animals are pursued by Muldoon’s dog, Frankie, who later falls in love with Precious. Surly and Buddy leave to rescue her while the others find a new park.
While searching for Muldoon’s car, Surly and Buddy run afoul of a colony of territorial white mice led by Mr. Feng. They evade the mice and find Muldoon’s mansion, where they find Precious in the bedroom of Muldoon’s bratty daughter, Heather. Precious tells Frankie she is uninterested in him, breaking his heart. Surly’s recklessness causes Muldoon to shoot Buddy, who falls off a balcony and falls unconscious. Andie, Jimmy, Johnny, and Jamie find what seems to be a suitable park, but it turns out to be a golf course that almost gets them killed. The brothers having multiple injuries while Andie had to resuscitate Jamie with CPR and even defibrillation with some wires.
Surly, Precious, and Buddy reunite with the others in the nut shop’s remains. While mourning Buddy, Surly recounts how they saved each other as kids; Buddy wakes up after Precious licks him. Surly leads the animals in retaking the park from Muldoon during Libertyland’s grand opening. Muldoon calls Gunther and his team over to capture them. Surly, the only one left standing, goes to Mr. Feng and his army. While attacking Surly, the latter convinces Feng the animals must work together regardless of whether they are from the city or a park.
Surly and the mice free the other animals and round them up to take back Liberty Park. They overwhelm the humans, destroy all of the rides, and attract the attention of the police. Precious finds Frankie, apologizes, and confesses she does care for him, causing Frankie to fall in love with her again. After the pair make up, Heather tries to convince Gunther to tranquilize them. But due to the interference of Surly, Andie and Buddy, Gunther shoots Heather, knocking her out while he runs away. Muldoon tries to escape the chaos using a hot air balloon, but Surly and Buddy commandeer a roller coaster to catch up to him. Surly makes it on top of the balloon, and he and Muldoon engage in a long battle. Muldoon falls on top of a bouncy house and is attacked by Feng and his colony. Muldoon, Heather, and Gunther are arrested for their crimes, and Libertyland is shut down for good.
Several months later, the people help rebuild Liberty Park to its former glory. After the park is rebuilt, Feng and his colony stay and focus on Tai Chi; Precious and Frankie have puppies; and Surly takes Andie on a ride with Precious to rob a nut cart.