Thompson was captain of relegated Southport last season scoring one goal in 26 appearances.
The 26-year-old has not played a competitive fixture since seriously injuring his patella in January.
A former England Under-19 international, Thompson is the Silkmen's eighth signing of the summer.
Find all the latest football transfers on our dedicated page.
National League club Macclesfield Town have signed former Celtic, Colchester and Tranmere defender Josh Thompson on a free transfer.