Second-placed Doncaster maintained the pressure on Third Division leaders Hull as they closed the gap to one point with a vital victory.
But they were made to battle all the way by the hardworking Cobblers who had the edge in midfield but lacked punch in attack.
Northampton looked the better side at the start but Doncaster grabbed an early goal and it proved enough for victory as they hung on to the finish.
The breakthrough came from Doncaster's best move of the match when Adriano Rigoglioso crossed from the right and Leo Fortune-West chested the ball down for Paul Green to slam a left-foot shot into the bottom corner from just inside the box.
It was an excellent start for Doncaster but they were unable to build on it as they were pushed back into their own half for long periods.
But the Cobblers' finishing failed to match their approach work and Des Lyttle had an angled snap shot saved by Andy Warrington in the 18th minute.
Martin Smith was a constant threat for the visitors but was out of luck in the 24th minute with a cracking 20-yard free-kick that dipped inches over the crossbar.
Doncaster went close to adding a second goal just before the interval when Fortune-West latched onto a cross from Green but placed his header just wide of the mark.
Michael McIndoe fired straight at visiting keeper Lee Harper after being put clean through by John Doolan early in the second half before Northampton resumed on the attack.
But they missed a great chance to equalise in the 54th minute when Derek Asamoah produced a weak shot which lacked pace and direction after creating the opening himself when he dribbled past Chris Beech.
Smith was out of luck again when he sent a snap shot just wide before Gregg Blundell had a well-placed header saved at the other end.
Northampton kept up the pressure to the finish but Rovers held firm with Beech heading out an effort from Chris Carruthers from under the crossbar in injury time.