Posh defender Tommy Rowe, striker Craig Mackail-Smith and skipper Grant McCann scored the killer goals in the 78th, 80th and 85th minutes to inflict on a stunned Huddersfield their first defeat in 28 league matches.
Victory marked a triumphant return to Peterborough for Ferguson, who was sacked by Preston in December after leaving London Road in November 2009, and he has now led Posh to a third promotion in four seasons.
HUDDERSFIELD: Bennett, Hunt, Peter Clarke, Kay, Naysmith, Roberts, Kilbane, Peltier, Arfield (Lee 81), Ward (Cadamarteri 79), Afobe (Rhodes 81).
PETERBOROUGH: Jones, Little, Bennett, Zakuani, Basey (Lee 64), Wesolowski, McCann, Rowe (Whelpdale 84), Boyd, Tomlin (Ball 90), Mackail-Smith.
Referee: S Tanner (Somerset).