The Stags edged themselves in front on the quarter-hour mark when a fortuitous header from centre-back John Dempster following a free-kick into the box looped just under the bar before nestling in the net via the inside of the post and the unfortunate Paul Farman.
City responded well, however, and deservedly went into the break on level terms when former Mansfield man Adam Smith broke clear of the offside trap before lifting the ball over the advancing Alan Marriott five minutes before the break.
Had the Imps made their pressure count during the first quarter of the second period then the outcome could well have been different but in the end it was a rare Town attack and a clinical finish from Louis Briscoe 14 minutes from time that edged them through.
With the home fans invading the pitch at the end to celebrate, the tremendous travelling 1,360 City fans were left to reflect on a more than successful FA Cup campaign, which saw the Club play six games in the competition in the same season since the turn of the previous century.
City boss David Holdsworth reverted to the side that started the first tie for this FA Cup with Budweiser Second Round Replay against Mansfield Town; this bringing about five changes to the side that secured a 4-2 league success at Dartford on Saturday.
Conditions were somewhat chilly as referee Darren Sheldrake led the two teams out of the tunnel and once he'd tossed the coin and the captains exchanged pleasantries, things got underway with the Imps backed by a noisy band of travelling fans behind the goal which was defended by Paul Farman in the opening period.
City kicked off but it was the hosts who were the first to press with a long Lee Beevers throw-in leading to a corner in the second minute but Chris Clements' delivery was headed away by Alan Power before the Mansfield man's follow-up effort sailed straight out for a goal-kick.
The Imps responded with a couple of throw-ins of their own before Dan Gray sliced a cross well over Alan Marriott's bar. At the other end a long Exodus Geohaghon throw was headed over by Ben Hutchinson.
An end-to-end opening continued with Power having a shot blocked before a free-kick from the left was hurriedly cleared by the Stags' defence after Gray was felled by John Thompson. Jamie Taylor was then denied a run on goal as he was penalised for a push on his marker following a long ball forward by Smith.
The action switched to he other end on the quarter-hour mark when a Thompson free-kick was met by John Dempster and he saw his hopeful looping effort float into the box and just under the bar before nestling in the net via the inside of the post and the unfortunate Paul Farman.
City looked for a quick response but Geohaghon rose well to clear a Power free-kick and after the ball ran away from Taylor under pressure from the Stags' centre-back, Mansfield pushed forward with Meikle tripped by Gray. Hutchinson wasted the opportunity though, curling well over.
A crunching challenge from behind on Gary Mills earned Anthony Howell a deserved 24th minute yellow card and from the resultant free-kick Taylor's flick-on was cleared behind by Geohaghon for a corner which was taken by Power before fizzing through a packed area.
City had Paul Farman to thank on the half-hour mark as he first kept out a Hutchinson snap-shot from a Briscoe cross and when the loose ball ran to Matt Green he was denied by a superb one handed stop by the Imps' number one.
A hand ball decision against Gilbert then saw Clements waste a ball into the box from a dangerous position. Briscoe then had a shot deflect behind as the Stags looked to double their advantage but Farman easily claimed Dempster's header.
Another Town corner quickly followed but City stood firm and responded by winning a corner of their own; this ended abruptly though when referee Sheldrake spotted a push on Marriott as he went to claim Power's delivery.
The former City man was left clutching thin air a minute later, however, as when a ball forward from Gray saw Smith break clear of the offside trap and with Marriott advancing, the Imps' winger neatly lifted the ball over him and into the net for his first Lincoln colours.
Smith was denied a second shortly after the restart when he cut inside from the left only for Marriott to palm away his goal-bound drive. A City corner then came along just as the Fourth Official indicated that a minimum of two minutes were to be added on.
City remained on the offensive with a Sheridan cross being met by Taylor who took a knock to his head as he went up for a header on the penalty spot. After Taylor returned from treatment, Marriott was forced to claim a chipped Smith centre as the Imps ended the half on the attack.
HT: Mansfield 1 Imps 1
Whilst City emerged unchanged, the hosts made a switch prior to the start of the second half with Ritchie Sutton replacing John Thompson at right-back.
Mansfield won a couple of corners shortly after play restarted and from the second, Farman was at full stretch to deny Dempster a second before the centre back headed wide when the ball was pumped into the box again.
Miller then got a block in to deny Briscoe and when City responded Geohaghon blocked a Smith drive and with the Imps keeping the ball in the attacking third, Taylor appeared to be pushed over by Geohaghon only for referee Sheldrake to spot nothing untoward.
City won a corner 12 minutes in with Power's delivery somehow evading everyone as the heads went up and shortly afterwards Power whipped in another ball which again failed to touch anyone as the Imps' players looked to prod home.
Superb work from Taylor saw him twist and turn his way past a couple of markers before having a shot deflect behind before Matt Rhead replaced Ben Hutchinson for the home side.
Referee Sheldrake then had words with Rhead and Boyce following a tussle as the pair waited for a throw-in and after City dealt with the danger, they broke at pace with a Taylor header from a smith centre appearing to hit the post before bouncing into Marriott's gloves as the City striker looked to latch on to the loose ball.
Boyce and Rhead clashed again with 19 minutes remaining; the former being penalised for a push on the latter but the Town substitute headed the resultant free-kick well wide of the target.
At the other end Taylor got in a diving header from a cross from the overlapping Gray only to direct it across goal rather than in it. City were made to pay for this miss a couple of minutes later as, after a ball ran kindly for the home side, it was squared for Briscoe who drilled past Farman to edge his side in front for a second time with 14 minutes remaining.
City responded by bringing on Vadaine Oliver and Colin Larkin for Gary Mills and Adam Smith five minutes later before a long Gray throw led to a corner which ended up seeing Marriott smother inside the six-yard box.
A mistimed challenge on Briscoe by Power saw him pick up a caution and for the last four minutes Conner Robinson was Jake Sheridan's replacement. Robinson was quick to win a free-kick but when Farman pumped the ball forwards, a claash of heads between Fofana and Howell brought about a break in play which City could ill afford.
Just three additional minutes were indicated by the Fourth Official and midway through these extra stages Marriott claimed a cross at the second attempt under pressure from Robinson. When he pumped the ball forward, Green won a corner to eat the seconds up further. The Stags duly kept the ball close to the corner flag and although the Imps were awarded a free-kick, referee Sheldrake blew for time once Farman lifted the ball forward.
With the home fans invading the pitch to celebrate a place in the Third Round, the travelling 1,360 City fans were left to reflect on what could have been, but also on what has been a more than successful FA Cup campaign, which saw them play six games in the competition in the same season since the turn of the previous century.
FT: Mansfield 2 Imps 1
City: Paul Farman, Dan Gray, Andrew Boyce, Tom Miller, Peter Gilbert, Gary Mills, Mamadou Fofana, Jake Sheridan, Adam Smith, Alan Power, Jamie Taylor.
subs: Paul Robson, Vadaine Oliver (for Mills 81), Nicky Nicolau, Colin Larkin (for Smith 81), David Morgan, Conner Robinson (for Sheridan 86), Jake Turner.
goals: Smith (41)
bookings: Power (83)
Mansfield: Alan Marriott, John Thompson, John Dempster, Exodus Geohaghon, Lee Beevers, Chris Clements, Anthony Howell, Louis Briscoe, Lindon Meikle, Matt Green, Ben Hutchinson.
subs: Ritchie Sutton (for Thompson h/t), Jake Speight, Nick Wright, Matt Rhead (for Hutchinson 61), Adam Murray, Lee Stevenson, Colin Daniel.
goals: Farman (15 og), Briscoe (76)
bookings: Howell (24)
Referee: Darren Sheldrake
Assistants: Alan Young & Dan Robathan
Fourth Official: Steven Rushton
Attendance: 5,304 (1,360 City supporters)