Even a win against Exeter would not have been enough to secure a top-two place because Leeds United came from behind against Bristol Rovers to book their place in the Championship next season.
The Terriers got off to a blistering start when Gary Roberts unleashed a fierce drive that Paul Jones could only parry into the top corner after 103 seconds.
The home side had appeals for a penalty turned down on 17 minutes as Matt Taylor vigorously claimed that Peter Clarke had handled in the box.
Huddersfield goalkeeper Alex Smithies spilled a cross and Taylor stabbed the ball straight at Clarke, only to see his penalty protests instantly dismissed.
George Friend let fly with a speculative effort that fizzed wide before the home side grabbed an equaliser.
Harley delivered a corner for Matt Taylor to plant a point blank header past Smithies.
Exeter went close to getting their noses in front when Liam Sercombe drilled over a cross and Ryan Taylor's glancing header dropped inches wide.
Theo Robinson missed a great chance for Town, slashing wildly and missing the ball completely, then at the other end Bertie Cozic was inches away with a thudding shot.
The home side served notice of their intent at the start of the second half as Harley let rip with a shot that sailed over the crossbar. But the Grecians survived a scare moments later, Roberts shooting straight at Jones.
Former Town striker Marcus Stewart had a shot cleared off the line by Peter Clarke before Exeter scored to avoid relegation.
Harley hit a scorching low volley into the bottom corner to send St James' Park into ecstasy as they assured their safety.
Exeter City: Jones; Tully, Golbourne, Duffy, Matt Taylor; Sercombe, Harley, Cozic (Edwards, 62), Friend; Stewart (Logan, 62), Ryan Taylor (Corr, 62). Unused substitutes: Marriott, Dunne, Burnell, Fleetwood
Huddersfield Town: Smithies; Tom Clarke (Williams, 72), Peltier, Peter Clarke, Trotman; Pilkington, Roberts, Kay, Drinkwater; (Collins, 46), Rhodes, Robinson (Novak, 53). Unused substitutes: Eastwood, N Clarke, Eccleston, Simpson.
Referee: Roger East (Wiltshire)
Huddersfield man of the match: Gary Roberts.
This season the Yorkshire Post has an exciting new match-day service, called Match Centre. Here you will find minute-by-minute updates, stats and team formations. Plus reports from every game in England, from the Premier League down to the Blue Square Premier.
Simply select your game from the pull down menu, then click on the 'i' information button on the right of the fixture and it will give you access to everything you need to know about your team.
So if you can't make it to a game, head for the Match Centre and we will give you the best seat in the house. Click the link below.
For the latest team news, score and commentary from your team check out our new Match Centre