Alnwick had the better of the first half and two converted tries saw them open up a 0-14 lead, which was extended to 7-24 by half-time.
But early in the second half Macclesfield scored a second converted try of their own to reduce the deficit to 14-24.
The home side continued to press and they hauled themselves level at 24-24 before Alnwick moved 24-27 in front with a penalty with ten minutes left on the clock.
Another penalty saw the Northumbrians extend their advantage to 24-30.
But in the dying minutes Macclesfield went over for another try and the conversion was good for the home side to snatch a dramatic victory.
Alnwick have no game this weekend and will play their final game of the season, at home to Sandal, on Saturday, April 23.