Surly is now loved by Liberty Park’s Urban wildlife community and currently overseeing an all-you-can-eat buffet at the condemned Maury’s Nut Shop. This worries Andie, as she prefers a more hard-working outlook on life. Despite Surly’s reassurances all is well, Maury’s Nut Shop is accidentally blown up by Mole when he accidentally forgets to cut down pressure from the boiler in Maury’s Nut Shop. Andie takes the opportunity to try and get the animals back to their roots by foraging for food in Liberty Park while Surly and Buddy try to find other food-packed places, but fail each time. Defeated, he and Buddy decide to return to the park.
Meanwhile, Mayor Percival J. Muldoon relishes in his wealth that comes from profit-making locations across Oakton City. However, he notices Liberty Park does not make money, so he decides to turn it into Liberty Land to pocket more cash. During a press conference, Surly and Andie discover Mayor Muldoon’s plot and Surly convinces the animals to fight back, which they do successfully and they manage to sabotage the construction worker’s efforts to tear down the park. That night, however, Surly’s enjoyment is short-lived when Andie attempts to convince the animals to work hard for food as he believes it can result in disappointment. When the foreman of the construction workers tells the Mayor about the animal attacks, Muldoon calls an extermination squad led by Gunther to get rid of the animals.
The next day, Surly gets caught in one of Gunther’s traps when looking for food and the animals are pursued by Frankie where he falls in love with Precious as she is suddenly abducted by Heather Muldoon. Surly and Buddy head out to rescue her while Andie and the Bruisers find a new park when Liberty Park is eventually overtaken. While searching for Muldoon’s car, Surly and Buddy run afowl with a colony of territorial white mice led by Mr. Feng. They manage to evade the mice and find Mayor Muldoon’s mansion where they save Precious in Heather’s room. In the process, Precious tells Frankie she is not interested in him, breaking his heart only to find that she is indeed in love with him. Surly’s recklessness causes Mayor Muldoon to mortally injure Buddy by causing him to fall off a balcony to the street below. Meanwhile, Andie and the Bruisers find what seems to be a suitable park, but it turns out to be a golf course that almost gets them killed.
A doleful Surly returns with Precious and a lifeless Buddy, reuniting with the others down in a hole near the construction of the theme park. While mourning for Buddy, a heartbroken Surly recounts the day he and Buddy met when they were kids saving each other from a hurricane. Precious licks Buddy as thanks for rescuing her, causing him to move. Surly tells Precious to lick him with everything she has. The moment she does, Buddy wakes up and a deeply relived Surly hugs him tight. At the animals’ urging, Surly leads them to take back the park from Mayor Muldoon and his followers during the exclusive opening of Liberty Land. After crashing the opening, Mayor Muldoon calls Gunther and his team over to capture them and Surly is the only one left standing, so he goes to Mr. Feng and his army. While attacking Surly, the latter convinces Feng and the animals must work together regardless of whether they are from the city or a park as an animal is an animal no matter what and this, along with Surly’s loyal and unwavering vow of love for all of his friends, causes Feng to spare him and agree to help.
After busting his friends out of one of Gunther’s vehicles, Surly rounds up all the animals to take back Liberty Park and they manage to overwhelm the humans. Precious finds Frankie and apologizes to him for what happened earlier. After the pair make up and Frankie falls in love with the pug all over again, Heather tries to get Gunther to tranquilize them, but due to Surly, Andie and Buddy interfering he shoots Heather instead, knocking her out while he runs away. Mayor 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 Mayor Muldoon engage in a long battle that ends with Surly causing him to fall on a bouncy house. Mayor Muldoon, Heather, and Gunther are arrested and Liberty Land is shut down by the police.
Several months later, the people help rebuild Liberty Park to its former glory. After the park is rebuilt, Mr. Feng and his colony decide to stay in the park, Precious and Frankie have puppies and Surly takes Andie on a ride with Precious with him to rob a nut cart.
In the post credits scene, it is revealed that Raccoon is still alive (from the events of the first movie) and he is swimming back home with sharks pursuing him.