A first half strike by Michael Reeve ensured it was a successful cup tie for Anstey, who were playing in the 2nd round for the first time in 21 years.
Despite having their fair share of chances, The Wrens were unable to find the back of the net having battled well. Josh Radford was dismissed in the second half for a second yellow.
The away side started brightly and created multiple early chances as Khyle Sargent tested Conrad Logan early on. Sargent's half volley just outside the box on 11 mins was his best effort, held comfortably by Logan.
Just a minute later Anstey went up the other end to test Wrens stopper Warren Squires. The ball was crossed into the centre of the box however Hakeem's scuffed volley was saved by Squires to deny the hosts.
Ex-Stags keeper Conrad Logan produced a fine save in the 19th minute to keep the scores level. An outstanding left sided cross from Chad Wootton was met by the forehead of Ryan Ingram, however Logan got up well to prevent the ball from finding the top right corner.
The visitors went even closer to going ahead as Craig Mitchell struck the post in the 26th minute. The forward's curled effort from the edge of the box had Logan beaten.
Despite chances for the visitors, Anstey remained a constant threat throughout and went ahead in the 37th minute. An up-field ball was collected well by Hakeem before the forward slotted Reeve through on goal. The Anstey striker efficiently converted the one-on-one chance to take the lead for the hosts.
The home side started the second half the better, dominating possession without creating clear cut chances.
Anstey's grip on the game strengthened in the 73rd minute as Wren's defender Josh Radford was dismissed for a second yellow.
Despite being a man down, Rainworth pushed for an equaliser. Some good work by Ryan Ingram in the 79th minute allowed the winger to cross to Mitchell however the delivery was slightly too high to meet the striker in front of goal.
Rainworth continued to press and almost snatched a late equaliser in the 92nd minute. An attack down the right saw the ball crossed across the face of goal, however the chance just didn't materialise for Mitchell who was coiled to strike from close range.
Rainworth: Squires, Herbert, Kyle Hempshall, Radford, Wootton, Kane Hempshall, Fisher, Sargent, Topliss, Mitchell, Ingram
Subs: Bamford, Wright, Titley, Pickering