An astonishing dust-up between two of their own players failed to prevent the ten-man Robins staging a remarkable fightback to earn their first away win of the season.
City had right-back Bradley Orr sent off by referee Mike Jones in first-half stoppage time when he struck out at team-mate Louis Carey in an amazing melee which saw keeper Adriano Basso step in to try to prevent his team-mates from fighting.
With that lack of harmony and a shaky first-half defence it seemed certain the Cobblers would step up a notch and earn their first home win of the campaign after defeats by Brentford and Nottingham Forest.
Both managers adopted an attacking, exciting policy throughout with some bold substitutions and, even though his side were handicapped for the second half, Robins boss Gary Johnson kept two strikers throughout.
It was Northampton that grabbed the lead in the 18th minute when City were slow to close down Andy Holt when his corner came back to him and, although they half-cleared his second cross, Jason Crowe's low shot took a deflection to baffle Basso and, when he spilled the ball, Andy Kirk tucked home his fourth goal of the season.
City were level 15 minutes later when the pace and trickery of David Cotterill saw him brought down by Chris Doig and Phil Jevons calmly sent Mark Bunn the wrong way from the penalty spot.
City showed their intent early in the second half with a raking drive from Lee Johnson flying wide while another screamer from Cotterill just missed the target.
At the other end, Kirk's volley was brilliantly turned away by Basso and Eoin Jess also fired over.
City went in front in the 71st minute when last season's top scorer, Stephen Brooker, cut inside and squeezed a shot inside Bunn's left-hand post.
And they sealed the win in stoppage time when Sean Dyche brought down substitute Jennison Williams and Cotterill converted the spot-kick.