Moore struck for the ninth time this season to give the Millers victory over the Sky Bet League One strugglers.
Both George Smith, for Northampton, and Moore had a brace of early chances to put their sides ahead.
Smith drove one effort narrowly wide and had one blocked by Shaun Cummings, while at the other end Moore was denied on the line by Ash Taylor after he had rounded Matt Ingram. He then had another effort blocked by the goalkeeper.
Daniel Powell then drove wide of goal, before Michael Ihiekwe's shot was tipped onto the bar by Ingram and Brendan Moloney cleared Ihiekwe's effort off the line.
Rotherham went ahead in the 52nd minute when Moore capitalised after Ingram could only push out Cummings' shot from the edge of the box.
Northampton searched for a leveller, with Billy Waters and Matty Grimes firing just over and Marek Rodak saving from Powell.
Moore nearly made it two late on but his header struck the bar.