Jon Brain kept out Adam Le Fondre’s third-minute shot with his legs, but he could do nothing eight minutes later when Dale Tonge’s long ball into the area was headed straight to Danny Harrison who promptly returned it with interest into the bottom corner of the net.
But Macclesfield equalised against the run of play in the 26th minute. A long-range shot smashed into the back of Ian Sharps and the ball dropped at the feet of Ben Wright who forced his way past two defenders before firing home.
After the break, Macclesfield really put up the defensive shutters and challenged Rotherham to break them down.
It took them until the 78th minute to do it when Le Fondre was upended as he broke into the box and the little man picked himself up to score his 27th of the season from the penalty spot after three minutes of protests from the visitors.
And two minutes later Rotherham made it safe when substitute Abdulai Bell-Baggie broke into the box and although his shot was parried by Brain, fellow substitute Drewe Broughton fired the lose ball home.