David Morley's unfortunate own goal in the 87th minute earned Hartlepool all three points from a five-goal thriller.
James Brown looped a header home from Eifion Williams's cross to open the scoring and Richie Barker bundled in on the hour to put the hosts in charge.
Town responded, though, and, after John Murphy had hit a post, Jordan Hadfield thundered home from 25 yards before Matthew Tipton levelled from six yards.
But Richie Humphreys' free-kick hit the bar and went in off Morley to seal it.
Hartlepool: Konstantopoulos, Barron, Nelson, Clark, Humphreys, Brown (Gibb 89), Liddle, Sweeney, Monkhouse (Foley 83), Eifion Williams, Barker.
Subs Not Used: Provett, Bullock, Darren Williams.
Booked: Liddle.
Goals: Brown 26, Barker 60, Morley 88 og.
Macclesfield: Lee, Regan, Morley, Swailes, McIntyre, Heath (Tipton 62), Navarro, Hadfield, Bullock (Reid 78), Miles, Murphy.
Subs Not Used: Rouse, Jennings, Scott.
Booked: Miles.
Goals: Hadfield 65, Tipton 70.
Att: 5,242.
Ref: J Moss (West Yorkshire).