Gritton arrived at the Moss Rose in the summer of 2007 and made a total of 45 starts for the Silkmen, plus a further 13 from the bench, scoring 16 goals.
He endured a miserable start to the season scoring only once in 15 games, before bagging six in seven with two goals in Macclesfield's 4-2 win at Saltergate on December 12.
Manager Keith Alexander said: "It is an offer that came out of the blue and shows just what can be achieved by a model professional.
"He had a poor start to the season, but has been outstanding in the last three months and has earned himself a new two-and-a-half year deal.
"His transfer should allow me to bring in some more bodies to strengthen the squad, but I am certainly not looking to let my best players go for next to nothing."