The Cobblers twice battled back to earn the point as Trotter's Scunthorpe missed the opportunity to leapfrog Tranmere Rovers back into the League One play-offs.
Northampton started brightly and Luke Guttridge volleyed against the bar while Trotter in his third start for the visitors cleared Andy Holt's header off the line.
Jason Crowe gave Town a deserved 38th minute lead when he beat Joe Murphy with a neat finish after Danny Jackman picked him out. But Trotter equalised in first-half stoppage time, heading home a near post corner from Grant McCann.
And the Iron got their noses in front four minutes after the restart when McCann scored from the penalty post, sending Dunn the wrong way after Guttridge had impeded Martyn Woolford in the box.
Woolford missed a couple of chances to increase Scunthorpe's lead. He fired against the bar from close range and McCann put the rebound wide and then shot over after the dangerous Hooper and Paul Hayes combined.
And Northampton took advantage to draw level on the hour when Anya headed home at the far post from a pin-point Guttridge cross.
But Matt Sparrow restored Scunthorpe's advantage eight minutes later when he hit a first-time rocket in off the bar after Northampton failed to clear their lines.
Anya should have equalised for a second time from close range but Murphy saved his header from Jackman's free-kick.
But Northampton's pressure finally paid off in the 76th minute when Hughes headed home Jackman's corner.
Elsewhere Billy Clarke failed to score as his Brentford side lost 3-1 to Dagenham and Redbridge whilst Dan Harding played 90 minutes in Reading's 2-0 win against Derby County.
Click here for a player profile on Liam Trotter and click here on a game by game rundown of his season to date.