A very tight first half was devoid of much excitement and ended in stalemate but Town picked up the pace in the second and dominated once Leonard had given them a 54th-minute lead with a fine long-range strike.
Several chances came and went before Hoskins showed impressive composure to net his ninth of the season and effectively secure victory, ending Northampton’s six-game winless run and restoring some confidence ahead of a two-week break from league action.
Kieron Bowie returned from suspension and was one of three changes as Aaron McGowan and Jack Sowerby also started, with Akin Odimayo, Will Hondermarck and Ali Koiki the men to drop out.
Cobblers showed good intent in the opening few minutes but the first dangerous attacking spell came at the other end and it ended with former Town midfielder Joe Powell bending a free-kick over the angle of post and bar.
Unlike their previous five matches, Town survived the first 15 minutes without conceding and they were showing some promising signs in attack with Bowie causing problems through the middle.
Bowie nearly got in behind on a couple of occasions and Marc Leonard’s defence-splitting forced Burton into some desperate defending but Cobblers, although marginally the better side, didn’t trouble Max Crocombe in the away goal throughout the first half.
The second period hardly burst into life but Cobblers broke the deadlock in splendid fashion nine minutes after the restart when the ball came to Leonard 25 yards out and he fired sweetly into the top corner via a slight deflection.
Town had their tails up and they almost added a quick second with Crocombe doing well to claw out Mitch Pinnock’s header after a fast breakaway, and Burton’s goalkeeper was also alert enough to tip Leonard’s low shot around the post.
Pinnock whistled a low effort just wide and the best chance fell to Leonard after he was slipped in by Hoskins on the counter but again Crocombe was there to make the save.
Eventually the second goal arrived and it came from a predictable source as Hoskins stayed calm in a crowded penalty box to take a touch, find space and pick out the bottom corner.
Thompson saved well from Cole Stockton as Burton threatened to set up a grandstand finish, but Crocombe remained the busier goalkeeper and he plucked out Pinnock’s brilliant free-kick before Town survived – not without some scares – nearly 10 minutes of stoppage-time to claim three points and a clean sheet.
Cobblers: Thompson, McGowan © (Koiki 90), Sherring, Willis (Monthé 90), Brough, McWilliams, Leonard, Sowerby (Appéré 84), Pinnock, Hoskins (Odimayo 90), Bowie. Subs not used: Dadge, Hondermarck, Simpson
Burton: Crocombe, Seddon, Sweeney, Oshilaja © (Bennett 84), Moon, Walker, Helm, Carayol (Stockton 57), Hamer, Powell, Lubala. Subs not used: Blackman, Harper, Gordon, Caprice, Gilligan
Referee: Scott Jackson