The eighth-tier visitors looked set to cause a stunning upset when goals from Jimmy Ball and Richard Bennett sent them seemingly coasting towards the third round draw.
And the drama was not just consigned to the pitch at the Sixfields Stadium as a huge fire at a nearby pub sent flames and smokes billowing within a few hundred yards of the ground.
Sam Hoskins sparked the hosts' unlikely comeback with a long-range effort in the 83rd minute and Jason Taylor touched home the equaliser from a free-kick two minutes later.
With the visitors left reeling by the late recovery there was still time for Dominic Calvert-Lewin to grab a winner for the Cobblers and book their place in the next round.
National League Eastleigh became the first non-league side to confirm their place in the third round as they secured a 2-0 win away to Evo-Stik Premier opponents Stourbridge.
James Constable prodded home the opener in the 59th minute and Josh Payne's late second secured the Hampshire side a place in the third round for the first time in their history.
Michael Harriman struck a stoppage-time winner as League Two Wycombe pulled off a minor upset with a 2-1 win over Millwall at the New Den.
The 2001 semi-finalists went in front through Paul Hayes early in the second half but the lead only lasted seven minutes before Ben Thompson equalised for the Lions.
But with the game seemingly heading for a replay Harriman seized his chance from close range to put Gareth Ainsworth's men into the third round.
Scott Boden's second-half header put Newport in the third round for the first time since 1986 as John Sheridan's men claimed a 1-0 win at Barnet.
Boden headed home an Andrew Hughes cross in the 59th minute and two late misses from home striker Michael Gash sent the Exiles through.
Four days after sacking boss Paul Sturrock, Yeovil also booked their place in the third round with a 1-0 home win over League Two rivals Stevenage.
The Glovers, currently rock-bottom of the Football League and led by interim boss Darren Way, claimed victory through Ben Tozer's 86th minute strike.
Sheffield United beat Oldham 1-0 through Matt Done's 47th minute strike, despite having Che Adams sent off in the 67th minute at Bramall Lane due to violent conduct.
Adam McGurk's early goal gave Portsmouth a 1-0 win over Accrington Stanley at Fratton Park, Lee Novak's stoppage-time goal gave Chesterfield a 1-1 draw with Walsall, and Leyton Orient and Scunthorpe must do it again after a goalless draw at Brisbane Road.
Source : PA