Substitute Paul Lewis headed a stoppage-time winner as Macclesfield secured a fifth win in their last six matches with victory at Forest Green.
Matthew Barnes-Homer gave Forest Green an early lead with a 12-yard effort.
Macclesfield hit back through Steve Williams before the break and Danny Whitaker struck the visitors' second.
Yan Klukowski levelled from the spot after keeper Rhys Taylor brought down James Norwood before Danny Andrews' cross was headed home by Lewis late on.
Forest Green have now lost six of their last seven games.
VIEW FROM THE DRESSING ROOM
Forest Green Rovers manager Dave Hockaday told BBC Radio Gloucestershire:
"They are absolutely devastated. There are some players with blood on their shirt. They have given everything and I know nobody would argue with that.
"We've come up with a very simple conclusion that as hard as we work, we've got to work harder. There is no simple solution to this. It's a game we feel we should won.
"They are so distraught and desperate to do well for the shirt and Forest Green Rovers.
"I am really disappointed, I feel for my players and staff, they are giving me everything and I'm asking for more. I'm the leader, people look to me and I have to stay strong, which I will."
Forest Green Rovers 01 Russell 03 Stokes 27 Pilkington 15 Oshodi 12 Asafu-Adjaye 23 Barry (Koroma - 94' ) 24 Kelly 10 Vieira (Klukowski - 61' ) 18 Barnes-Homer Booked 09 Wright 30 Mangan (Norwood - 57' ) Substitutes 08 Klukowski 07 Norwood 20 Koroma 11 Forbes 13 Bulman Macclesfield Town 01 Taylor Booked 12 Williams Booked 26 Halls (Bolton - 32' ) 03 Andrew Booked 06 Turnbull 07 Mackreth 23 Whitaker 02 Connor 09 Holroyd (Boden - 72' ) 08 Jennings (Lewis - 80' ) 11 Winn Substitutes 14 Gnahoua 19 Boden 15 Lewis 05 Bolton 24 Rowe
Ref: Daniel Cook