A goal in each half from Jordan Preston and Dayle Southwell booked Halifax’s trip to the League Two side in the first round, and pocketed £25,000 to boot.
It was ironic that Town took the lead through Jordan Preston’s corner going straight in at the near post, considering the chances they squandered after that.
Jonathan Edwards, Southwell and Matty Kosylo should all have scored before half-time.
But the tie was decided when Kosylo’s sideways pass found Southwell 15 yards out, and he swept the ball past the keeper.
Harrogate Town were knocked out by Wrexham in their fourth qualifying round replay.
After more than four hours of football between the sides without a goal, Akil Wright finally broke through, handing the Welsh outfit a 1-0 lead in the 62nd minute.
His acrobatic finish from a corner was added to 14 minutes later when Mike Fondop-Talom held the ball up before finding Luke Young, who fired a first-time strike into the bottom corner of James Belshaw’s goal.
The sides had met twice previously this season, once in the National League and then in Saturday’s initial FA Cup clash, both games ending goalless.
But on this occasion it was Wrexham who emerged triumphant, setting up a first-round tie with Weston-super-Mare, while Simon Weaver’s team were left to reflect on what might have been after what was just their second defeat in 18 outings this campaign.