Anthony Stokes, who grabbed Rovers' goal at the weekend, opened the scoring on 29 minutes, latching onto Danny Graham's flick to fire home.
But the home side hit back moments into the second half when Mitchell Rose levelled with a back post header.
However Rovers' response was emphatic as they scored two goals in as many minutes. Shane Duffy with a towering header, before Stokes grabbed his second from close-range.
Rovers controlled proceedings in the closing stages and should have scored more, Stokes coming close to a hat-trick with a shot that crashed off the crossbar.
Banana-skin avoided, Rovers can look forward to the second round draw tomorrow evening.
Owen Coyle made five changes from the side that faced Norwich City on the opening day of the season for the first round clash.
All three substitutes who impressed on Saturday; Gordon Greer, Anthony Stokes and Jack Byrne, came into the starting line-up, whilst Craig Conway and Stephen Hendrie also started at the One Call Stadium.
After the below par performance at Ewood at the weekend, Rovers were eager to impress, but a slack backpass almost proved costly inside two minutes.
Shane Duffy's intended ball to Jason Steele was easily intercepted by CJ Hamilton, but the Stags striker fired wide when well placed.
Rovers responded well with Byrne lively in midfield. His sixth minute run saw the Irishman feed Ben Marshall, but Scott Shearer in the Mansfield goal saved superbly low to his right.
Darragh Lenihan shot straight into the arms of Shearer soon afterwards, whilst Chris Clements fired wide for the home side.
Then Hamilton got the better of Greer in the area, but he too couldn't test Steele. A free-kick from Clements soon after saw the Rovers keeper scramble across his line to thankfully see the ball go the wrong side of the upright.
But just ahead of the half hour mark it was Rovers who broke the deadlock. Hendrie played a ball up to Danny Graham and he fed Stokes who found the bottom corner of the net via a deflection.
It was the Republic of Ireland international's second goal in successive matches for his new club.
That Rovers goal took the sting out of the game, and they weren't unduly troubled in the remaining minutes of the first half.
But despite looking largely comfortable in the opening 45, it took the Stags just two minutes into the second half to get back on level terms.
A Mal Benning cross from the left was flicked on in the centre and Mitchell Rose sent a looping header into the top corner of Steele's goal.
But the Rovers response was swift and emphatic as they plundered two goals in as many minutes to restore and then stretch their advantage.
After a Stokes shot had deflected for a corner, Conway took the kick from the right and his delivery picked out Duffy who headed beyond Shearer put Rovers back in front.
Then on 55 Rovers made it 3-1 with another cross from the right, this time it was Marshall with the inswinger, Stokes grabbing his second of the game with a near post header.
Rovers could have had further goals as they enjoyed a purple patch of play. Greer saw a goalbound header blocked in the six-yard box, whilst after Graham had chased a ball over the top, Marshall saw his effort saved.
Both sides made changes in the closing stages as Liam Feeney replaced Craig Conway and Connor Mahoney came on for Danny Graham. Whilst the Stags brought on Matt Green and Danny Rose who had both scored at the weekend.
But Rovers did well to quell any further danger, only wayward efforts from distance and a Benning free-kick that Steele held well came their way.
The final minute saw Stokes the width of the woodwork away from claiming the perfect hat-trick, latching onto a ball over the top, the forward fired left-footed, only to see the ball crash down off the crossbar and away.
There were further Rovers chances as the clock ticked towards full time, but Feeney and Byrne both saw low shots saved, but they were already safely through to round two of the competition.
MANSFIELD: Shearer, Bennett, Benning, Collins (c), Chapman, Clements (sub Hakeem 75 mins), Baxendale (sub D. Rose 70 mins), M. Rose, Hamilton (sub Green 70 mins), Hemmings.
Subs not used: Jensen (GK), Taft, Hurst, McGuire.
Goals: M. Rose 48 mins.
ROVERS: Steele, Lowe (c), Duffy, Greer, Hendrie (sub Henley 72 mins), Marshall, Byrne, Lenihan, Conway (sub Feeney 68 mins), Stokes, Graham (sub Mahoney 80 mins).
Subs not used: Raya (GK), Akpan, Guthrie, Wharton.
Goals: Stokes 29, 55 mins, Duffy 53 mins.
Booked: Byrne 71 mins.
Attendance: 2,885 (including 566 Rovers fans).