Hardy, 26, has been on loan at the Silkmen from Buxton since October.
Since then, he has featured eight times for the club, becoming an important player in the squad.
He will make the permanent move following the conclusion of his loan period.
On securing a permanent move, Hardy said, "I'm really glad that we got the move sorted. Since I've been at the club, I've loved it. I can't wait for the future now.
"I couldn't have timed it better really, we've got some big games coming up so it's good to have my mind at ease and now I can get ready to crack on.
He added, "The direction the club is going in is something that I want to be a part of, there's just so many positives to being here.
"Playing in front of 3,000-4,000 fans every home game is a great experience."
Photo credit: Macclesfield F.C
Keep up-to-date with our exclusive email newsletters.
Subscribe