The former Algerian Under-20 international, who can also play in central defence, was released from the City Ground at the end of last season.
The 21-year-old enjoyed a spell on loan at Lincoln in 2007/08 and made 12 appearances, scoring one goal, and is confident Macclesfield can prosper this season.
He said: "I've been in training and I know we have a fair few good players here and a good quality squad.
"There's no reason why we can't surprise a few people and make a bid for the top seven next season.
"We're all working hard in pre-season training and you can see the quality we have here."