Rotherham, early favourites for promotion and on the back of a 4-3 extra time loss at West Brom in midweek, started sluggishly as the Silkmen carved out three decent opportunities in the first 20 minutes.
Ross Draper placed an inch perfect pass through the Millers backline for Matt Tipton, but with only Andy Warrington to beat the forward somehow curled the ball wide of the post from only eight yards out.
Draper was in the thick of it again soon after as Town rallied, Warrington diving to his left to push away a mishit effort.
On a high bouncing pitch kicking against the wind the Millers started to settle and class told in the 24th minute.
Paul Warne was set away down the right and his whipped low cross was met on the run by Adam Le Fondre who powerfully headed his third Millers goal at the near post to give Rotherham the lead.
However it was far from one way traffic, and Mac netted just before the interval to reduce the arrears.
Colin Daniel got free inside the box and squared the ball for the unmarked Tipton who this time couldn't miss and swept home from 12 yards.
The second half spun a familiar tale in the early stages as the Millers back four came under increasing pressure. Izak Reid, brother of ex-Miller Reuben, saw a shot from Daniel saved as he created an opening and then another Tipton effort was parried by Warrington, who needed a second attempt to grasp the ball on the goalline.
But as the home side committed bodies forward the Millers sealed victory on the break three minutes from time.
Dale Tonge set free sub Ryan Taylor who cut into the area, turned and laid the ball across for Danny Harrison who drilled home a low 15 yard shot to wrap up proceedings, but the home team could feel slightly unlucky with the scoreline.