George Dobson's stoppage-time winner all-but condemned Northampton to relegation - and left Walsall needing just a point to secure their own safety.
Midfielder Dobson's late strike left Northampton - who were twice thwarted by the woodwork - doomed, barring a nine-goal victory over relegation rivals Oldham in their final game.
Northampton were almost in front after just two minutes as Daniel Powell's low drive was superbly tipped onto the post by Walsall keeper Liam Roberts.
Walsall defender Kory Roberts cleared Matt Crooks' cross-shot off the line in the 23rd minute and, five minutes into the second half, Crooks again went close, steering over Shay Facey's cross from eight yards.
Northampton almost won it in freak fashion after 76 minutes as a Matt Grimes cross floated over Roberts, struck the post, hit the keeper and bounced onto the bar before being hacked clear.
But Walsall came on strong towards the end and, after Nicky Devlin glanced a header wide, Dobson won it in stoppage time as he steered Amadou Bakayoko's pass into the bottom corner from 15 yards.
League One News
One arrested for anti-gay abuse at League One match
A footballer in England's third tier reported being subjected to anti-gay abuse from the stands, leading to police making one arrest.
Adebayo Akinfenwa talks FIFA fame, combating racism and Beast Mode State of Mind
Anglo-Nigerian striker Adebayo Akinfenwa discusses how being the strongest player on FIFA has changed his career and helped combat racism.
Cameroonian Manny Monthe's career resurrection a lesson in self-belief
Cameroonian Manny Monthe admits it has been a tough journey to get where he is today, plying his trade with Tranmere Rovers in League One.
English games reporting hate crimes spikes 47%
The number of football matches in England and Wales where hate crime incidents were reported increased by 47% in the 2018-19 season.
Kwesi Appiah under pressure heading into crunch clash
AFC Wimbledon's fixture against key rivals Milton Keynes Dons is the pick of the EFL League One's seventh round of matches this weekend.
Bolton avoid Bury's fate with club-saving sale
Third-tier club Bolton Wanderers have avoided being expelled from the EFL following their sale to Football Ventures Limited.