Macclesfield, playing their first game under returning boss Brian Horton, started brightly and went close through Tony Diagne and Matt Hamshaw.
Rotherham went ahead eight minutes before the break when Danny Schofield's left wing cross flicked off a head in the area and Mark Bradley nodded home at the far post.
The hosts doubled their advantage 12 minutes after the break. Kieron Cadogan pulled the ball back from the bye line and Ben Pringle had little trouble beating Richard O'Donnell.
But Macclesfield's reply was almost immediate when Matt Smith smacked a shot against the post a minute later, and Smith did pull one back after 66 minutes, heading home Hamshaw's corner.
The Millers quickly restored their two goal advantage with Alex Revell cutting in from the left and beating O'Donnell with a powerful drive.
Macclesfield refused to lie down and substitute Lewis Chalmers netted their second from the penalty spot after 73 minutes following Bradley's trip on Smith.
But Rotherham hit back again, Cadogan firing home in the 78th minute after O'Donnell foiled Rotherham with two good saves, but a third shot rebounded off the post straight to Cadogan's feet.