Gareth McAuley had put Lincoln ahead early in the game, his looping far-post header going in off the post.
Lincoln dominated the early stages, with Paul Harsley also clearing off the line from Jamie McCombe's flick.
Harsley equalised for Town with a strike on the turn and Danny Whitaker almost forced extra-time but Alan Marriott tipped his shot over.
Lincoln manager Keith Alexander:
"The team worked their socks off and we got the right result.
"The fans were magnificent - we were lucky to get 2,000 a few years ago but now we've taken 2,000 away with us.
"Macclesfield had to try and score - we get slaughtered for having two or three big 'uns, but we don't score many from set pieces so we're delighted."
Macclesfield: Fettis, Morley, Swailes, Carragher, Barras, Bailey (Whitaker 65), Harsley, McIntyre, Townson (Miles 60), Parkin, Tipton (Briscoe 75).
Subs Not Used: Wilson, MacKenzie.
Booked: Morley.
Goals: Harsley 76.
Lincoln City: Marriott, McCombe, Morgan, Futcher, McAuley, Sandwith, Butcher, Gain, Taylor-Fletcher (Asamoah 90), Yeo (Bloomer 87), Green (Beevers 77).
Subs Not Used: Hanlon, Rayner.
Booked: Sandwith, McAuley, Morgan.
Goals: McAuley 15.
Agg: (1-2)
Att: 5,223
Ref: P Crossley (Kent).