Pools went into the game on the back of four successive home wins and dominated this one, missing a host of chances to take the game to penalties.
The Millers took the lead after eight minutes, Tom Eaves firmly planting a header home from Michael Tidser's corner for his first goal for the club.
The rest of the half was one-way traffic, but all Pools had to show for their effort was Andy Monkhouse's 24th-minute leveller - the former Miller rolling his finish across keeper Adam Collin.
Collin then saved from James Poole, Luke James and Monkhouse as the home side were dominant.
But after 44 minutes, the Millers regained the lead. The ball was rolled into the path of Lee Frecklington and his shot was covered by keeper Scott Flinders, only for a big deflection off Kieran Agard to wrong-foot the keeper.
Pools didn't dominate the second half quite like the first, although they went close to a leveller at the death.
In four minutes of injury time Jack Baldwin headed against the bar after man of the match Collin had denied Neil Austin, then Antony Sweeney hooked over from close range as Rotherham held out.
The Millers only other effort saw sub Alex Revell's late goal disallowed.