He has played 53 times for the Spireites in all competitions since making his debut in 2008.
The deal will officially go through on 1 January and he could make his Silkmen debut against Bury later that day.
Source: BBC Sport