Shaun takes the bus to the Big City, followed by the other sheep, while Bitzer the dog is a better tracker and goes direct to the hospital.
The sheep wear disguises to fool the Animal Containment Office/Health Inspector, but Shaun is cornered in a posh restaurant, and sent to the pound. Bitzer the dog has also been captured, trying to impersonate a surgeon, and they spend a night together in the cells.
Shaun's friends help to break them out, and they lock the Health Inspector up before making an escape.
Meanwhile, The Farmer has reinvented himself as 'Mr. X' - a hairdresser to the stars. When the animals follow billboard adverts to his salon, he doesn't recognise them, breaking their hearts. They take to the streets, and sing a little song to keep themselves warm - which carries on the breeze to his ears. He loses his medical form, which floats back on the wind and ends up next to the sheep.
They are relieved to learn he just has amnesia and think of a plan to kidnap him and take him back to the farm ... but the Health Inspector is on their case.
They somehow kidnap The Farmer, disguise themselves in a pantomime horse costume and make it back to the farm, (I know, I know, I think I fell asleep a little at this bit as it's a bit of a blue -- it's hard going without any dialogue and the gags do dry up a bit!!) but the Health Inspector follows them. He shows up with his arsenal of weapons, and causes carnage.
Just as he is about to ram little Shaun with a tractor and push him off a cliff, The Farmer awakes and regains his memory just in time to stop him. Just then, the bull enters the scene, and smacks the Health Inspector up into the air and into a pile of manure.
The stray dog they picked up wants to return to the city, and hitches a ride on a bus - and instantly connects with the driver who'll soon be her new owner.
The pigs panic and quickly clean up the house, and all the animals rest. The next morning, The Farmer is ready with his lists of tasks, but thinks better of it.
In the end credits we see what happens to the animals, but by far the highlight is the staring dog in the pound -- who was really just a cardboard cut-out, with a Shawshank style hole behind cut into the wall! That whole scene is the best thing I've seen all year.