The Millers were heading for a frustrating draw until Ipswich loanee Moore scored twice in the space of five second-half minutes before Anthony Forde and Jerry Yates also added late goals.
It looked like an easy afternoon might be on the cards as the hosts took an eighth-minute lead through Michael Ihiekwe when the defender headed home from close range after Moore headed a corner against the crossbar.
The Millers could not build on their start and were pegged back midway through the first half when Craig Davies nipped in at the near post to turn Jack Byrne's corner in.
If the first half was even, the second one belonged to Rotherham as they dominated throughout.
They had chances to restore their lead as Moore had a header saved by Jack Ruddy while Lee Frecklington and Joe Newell dragged wide before Moore struck two quickfire goals.
The first came in the 73rd minute after Ryan Williams' shot was palmed into his path by Ruddy, giving him an easy tap-in, and his second was a free header from a corner.
Forde put the gloss on the scoreline with a late tap-in following a fine jinking run by Joe Newell and Yates made it five with a close-range finish to leave Oldham stranded at the bottom of the table.