Rotherham ended their three-game losing streak as they leapfrogged League Two play-off rivals Northampton.
Daniel Nardiello's penalty gave the Millers the lead after Mark Bradley was tripped by Ben Harding in the area.
Liam Ridehalgh went close for Rotherham in the second half before Ben Pringle doubled their tally with a curling effort from the edge of the box.
David Noble got the third three minutes later before Clarke Carlisle's injury-time header reduced the arrears.
VIEW FROM THE DRESSING ROOM
Rotherham manager Steve Evans told BBC Radio Sheffield:
"It was important to match the physicality of the most direct team in English football. I thought the boys stood up to that.
"I thought we managed and hustled to get the ball down to play. I thought it was unfortunate that it was 3-1, it really could have been more.
"Sometimes it's not about winning, it's about how you win as it is about how you lose."
Northampton Town manager Aidy Boothroyd told BBC Radio Northampton:
"We definitely didn't deserve to get anything. I think for the first time this season, we got outworked.
"If a manager's in a bit of trouble or if a team's on a bad run of form, bring us along, because we seem to get them going again. I don't know why that is.
"I'm disappointed because we're far better than that.
"I looked at these two games and I knew it was going to be tough, and we've got nothing, and we have to bounce back from these set-backs."
Sorry, we were unable to load match stats, please try again.