Shrewsbury stayed in the hunt for automatic promotion thanks to a double from substitute Lionel Ainsworth.
Macclesfield went ahead when Hamza Bencherif rifled home from 25 yards but the lead was short-lived, Jon Taylor equalising with a low shot.
Ainsworth replaced the limping Taylor and put the Shrews ahead when he fired into the corner.
He powered in his second four minutes later before Matt Harrold completed the scoring in the last minute.
POST MATCH REACTION
Shrewsbury manager Graham Turner told BBC Radio Shropshire: "Everyone gets on edge at this time of year when you're a goal down, and it was important to get back on level terms quickly.
"Young Jon Taylor did extremely well for the goal, just to keep his composure and finish it off.
"You plug away so you believe you can work your way back to victory and in the end we wore them down with some good football.
"Macclesfield could've been a handful for us, but in the end we got the ball down nicely and passed it extremely well. It was never easy, but it was a job well done."