Campbell left the Silkmen by mutual agreement on Thursday.
McMahon, 35, managed Ebbsfleet in the National League before his departure in November 2018 and this is his first Football League managerial job.
He will be assisted by former Charlton and Brighton boss Steve Gritt and club legend Danny Whitaker.
Whitaker had 11 seasons as a senior player at Macclesfield over two spells before retiring in the summer.
McMahon has signed a contract until the end of the season at Macclesfield, who have taken six points from their first three league games, having narrowly avoided relegation last term.
The Silkmen were bottom of the table when Campbell took charge, but he led the club to survival amid off-field financial concerns.