Wigan Athletic 2 Northampton Town 3
Latics made a nightmare start to the game, falling two goals down inside 20 minutes.
Latics pulled one back on 63 minutes when Tom Pearce was tripped inside the Northampton box, and Joe Garner sent the goalkeeper the wrong way from the spot.
But a mistake from Chris Merrie allowed the visitors to regain their two-goal advantage, Caleb Chukwuemeka making no mistake from 12 yards.
Latics kept at it, though, and Tom James headed home powerfully from a Pearce cross with 15 minutes to go.
And Latics thought they'd got back on level terms on 85 minutes, when Scotland Under-19 striker Kyle Joseph - off the bench for his league debut - fired against a post.