Peterborough struck three goals in seven second-half minutes to bounce straight back to the npower Championship at the first attempt.
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.
Rowe headed home McCann's free-kick, Mackail-Smith fired his 35th goal of the season two minutes later and McCann delivered the knockout blow with a fine free-kick five minutes from the end of normal time.
Victory marked a triumphant return to Peterborough for manager Darren 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.
More than 35,000 Huddersfield fans looked on in disbelief as their season was shattered in seven devastating minutes, Lee Clark's side denied promotion in the cruellest of fashions by a first league defeat since December to leave the Yorkshiremen with nothing.
Huddersfield made one change from the side that kicked off the second leg of their penalty shoot-out win over Bournemouth in the semi-final, with midfielder Scott Arfield replacing leading goalscorer Jordan Rhodes.
Peterborough were unchanged following their 4-3 aggregate win over MK Dons in their semi-final.
Posh fans were on their feet in the fifth minute when Mackail-Smith scampered clear, but his low shot was deflected on to Huddersfield goalkeeper Ian Bennett's left-hand post.
Peterborough had Clark's side on the back foot in the opening exchanges before Town skipper Peter Clarke's header, comfortably held by Posh goalkeeper Paul Jones, signalled a better spell for Huddersfield.
Posh striker Lee Tomlin and Town midfielder Lee Peltier were both booked for rash tackles during a feisty six-minute spell towards the end of the first half.
And although chances were at a premium, Peterborough's three-pronged attack of Mackail-Smith, George Boyd and Tomlin carried by far the greater threat than Huddersfield's isolated striker Benik Afobe.
But Town rallied and winger Gary Roberts' curling free-kick was saved at full stretch by Jones just before the break, while Afobe's shot on the turn flashed just wide.
Mackail-Smith then spurned another golden chance in first-half injury time following good work from Tomlin and Boyd, firing wide from 12 yards again with only Bennett to beat.
McCann curled a left-footed free-kick just over the crossbar five minutes into the second half.
But Huddersfield began to get on top and went close to taking a 59th-minute lead when winger Danny Ward cut inside and crashed an angled shot against the top of the crossbar.
Town defender Antony Kay was lucky to receive only a yellow card after cutting down Mackail-Smith in the 75th minute and Tomlin wasted the free-kick.
But three minutes later Town defender Gary Naysmith tripped Boyd on the edge of the penalty area and from McCann's free-kick, Rowe flicked his header beyond Bennett.
Posh fans had had no time to catch breath when Boyd stole clear down the left and his cut back into the area found Mackail-Smith, whose low shot took a slight deflection off Kay and spun away from Bennett inside the far post.
Town were then dealt a knockout blow after Clarke felled Mackail-Smith, with McCann clipping home an exquisite free-kick to seal a stunning finale.