The Stags had also played Liverpool in last season's competition and were hoping for another dose of the big time.
It even looked on the cards after 12 minutes when Sam Clucas sent Lindon Meikle to the left by-line from where he picked out the head of Ross Dyer, who made no mistake from almost on the line.
Clucas almost made it 2-0 after 23 minutes but failed to get his left-footed finish on target from Dyer's lay-off.
Jonson Clarke-Harris warmed home keeper Alan Marriott's hands with a rasping 30-yard free kick and also saw an offside flag raised before he rolled the ball into the home net and Mike Petrasso was just wide from a James Tarkowski nod-down as the home side defended manfully.
But Mark Oxley's low save from Meikle after 52 minutes proved crucial for the visitors as Danny Philliskirk buried a superb 18-yard free-kick into the top right corner five minutes later.
Petrasso then set up Clarke-Harris to make it 2-1 with a low shot after 62 minutes and the floodgates opened.
Matteo Lanzoni headed home a Philliskirk corner after 76 minutes before Adam Rooney completed the scoring from the spot nine minutes from time after John Dempster had been harshly penalised for handling a Clarke-Harris blast at close quarters.
Dempster was then dismissed to add insult to injury on a night to forget for Stags.
Leon Clarke marked his return to the starting line-up with a dramatic injury-time winner as Coventry progressed to the third round of the FA Cup with a 2-1 victory at home to Hartlepool.
The big striker netted 10 minutes from the interval but had to add a late second to give Coventry an away tie at Barnsley in the new year.
The former Wolves and Sheffield Wednesday forward missed the first game between these two sides with a hip injury but showed he had recovered when he raced away from the visiting defence and neatly chipped over Scott Flinders.
The Pools keeper was in fine form, coming out on top in two one-on-ones and producing a stunning save to deny Clarke from close range.
When he was beaten in the second half, he watched Callum Wilson's effort deflect on to the top of his bar and over for a corner.
Hartlepool created precious little in terms of chances but Jack Baldwin headed home in the 87th minute to make extra-time look inevitable.
But two minutes into added time Clarke reacted first when Flinders saved and side-footed home.
Burton edged to a 1-0 win over Fleetwood to clinch a third-round trip to Bournemouth.
A tight game was decided by Billy Kee's fourth goal in as many games in the 24th minute.
Steve Schumacher drove a 20-yard shot narrowly wide in an early burst of pressure from the visitors.
But their efforts quickly fizzled out and Kee put Burton ahead. The striker fastened onto a Chris Hussey header and turned on the edge of the area before beating keeper Scott Davies with a precise shot into the bottom corner.
Rene Howe had a chance to double Burton's advantage six minutes later but headed wide under pressure from six yards.
Fleetwood came to life after the break to test Dean Lyness with shots from Charlie Taylor and Gareth Evans.
Burton could have had a second on the hour mark but Davies got his finger-tips to Hussey's header before Kee hammered the loose ball too high.
The visitors pushed more and more men forward in search of an equaliser but Evans dragged a chance wide in the 80th minute.