Posh hit back from Gabby Zakuani's first-half own goal to lead heading into the final 10 minutes courtesy of strikes from Jack Payne and Britt Assombalonga.
But they conceded twice late on to slip down to fifth in the table. They were joint top just over a month ago following a goalless draw with Sheffield United.
"I can't believe we've lost. When we went ahead I could only see us scoring more," said Ferguson.
"I would have been disappointed with a draw so to lose it was a real kick in the teeth. But if you make individual mistakes you get punished and their first and third goals were the result of appalling defending."
Ferguson was furious with Assombalonga for picking up a "ridiculous" yellow card.
"Britt will miss Saturday at Wolves now. I have a three-year-old who behaves better than some of them," he added.