The Millers went ahead after 27 minutes when home keeper Mark Oxley could only half-save Richard Smallwood’s shot and Mark Bradley drilled in the loose ball from 10 yards.
Bradley’s first goal since October was almost followed by a quick second for Rotherham, but Alex Revell’s close-range header was blocked on the line.
Oldham’s Charlie MacDonald then squandered an excellent chance to level when he raced clean through and was denied by the legs of keeper Adam Collin.
MacDonald was again wasteful on the stroke of half-time, firing the rebound off target after Collin had saved from Gary Harkins.
Oldham were punished after 64 minutes when Ben Pringle passed to Lee Frecklington, who unleashed a spectacular 25-yard drive for his 12th goal of the season.
Kieran Agard could have added a third goal as Oldham faded badly in the second half to register three home defeats on the bounce.