Rotherham were ahead after seven minutes with David Ball picking out Anthony Forde in space and the winger rocketed an effort into the top corner from 25 yards.
The lead was almost doubled minutes later when Michael Smith's header was somehow tipped onto the post by the diving Simon Eastwood.
Goalkeeper Eastwood was beaten in the 29th minute after he palmed Joe Newell's stinging effort straight to Richie Towell to tap in.
Marek Rodak was called into action at the other end after Isaac Buckley-Ricketts had broken clear.
There was little Rodak could do in the 43rd minute as James Henry skipped past challenges in the box before firing an unstoppable strike into the roof of the net.
Rotherham restored their two-goal lead after 52 minutes when Smith was on hand to turn in Forde's cross.
Substitute Caolan Lavery was inches away from crowning the victory as he just missed Smith's return ball across the box.