Daggers made three changes for the trip to Moss Rose, with Curtley Williams, Luke Guttridge and Paul Benson coming in to the starting XI.
In the 14th minute, Daggers conceded the opening goal when Mitch Hancox found the net from distance.
However, with four minutes left in the half, Luke Guttridge levelled things up with a 20-yard free kick.
Daggers took the lead in the 65th minute when Corey Whitely converted a penalty after a foul in the box on Paul Benson by Neill Byrne, who was sent off.
With 12 minutes remaining, Jordan Maguire-Drew came off the bench to turn home a cross from the right by Williams.
And Maguire-Drew added gloss to the result in the last of the regulation 90 minutes, producing a delightful lob from 25 yards to stun Macclesfield stopper Scott Flinders.
Macclesfield (4-3-3): Flinders; Halls, Byrne, McCombe (Pilkington 68), Fitzpatrick; Whitaker, Summerfield (Whitehead 70), Norburn; Browne (Mackreth 80), Dudley, Hancox
Subs: Ross (GK), Haworth
Sent off: Byrne 64 (professional foul)
Daggers (4-1-2-1-2): Justham; Williams, Doe, Donnellan, Widdowson; Robson; Boucaud (Raymond 80), Guttridge; Whitely (Howell 70); Benson, Romain (Maguire-Drew 62)
Subs: Cousins (GK), Ling
Referee: Neil Hair
Attendance: 1,281 (77 Daggers fans)