It will be the first meeting between the clubs since the 1920s. Quadruple-chasing Arsenal will be strong favourites against the League One club who are in the fifth round for the first time since 1975.
The Stags are managed by Nigel Clough, son of legendary manager Brian, who despite his many successes never led a team to FA Cup glory.
The Gunners head a list of the four highest-ranked clubs left in the competition, all of whom have been drawn away from home.
Manchester City, beaten finalists in the last two seasons and aiming for a fourth successive FA Cup final appearance, face Newcastle United at St James' Park in an all-Premier League tie.Â
Eight-time winners Chelsea, who lost three consecutive FA Cup finals from 2020-22, will play at Wrexham, who reached the last 16 for the first time in 29 years by beating Ipswich Town.
Liverpool, who have not gone beyond the quarter-finals since they lifted the trophy four years ago, will take on Premier League bottom-club Wolverhampton Wanderers at Molineux.
The next highest-placed club, Brentford, will be also away, to fellow Premier League Londoners West Ham United after negotiating Monday evening's fourth-round tie at non-League giantkillers Macclesfield Town.
Keith Andrews' team sat 116 places above the National League North team, who saw off holders Crystal Palace in the third round, at the start of the evening and needed a 70th-minute Sam Heathcote own goal to progress at Moss Rose.
Leeds United, aiming to reach the quarters for the first time since 2002-03, have been drawn to play at Elland Road against boss Daniel Farke's former club Norwich City.
The winners of Port Vale's postponed fourth-round tie at home against Bristol City will face Sunderland, while Fulham take on Southampton at Craven Cottage.
FA CUP FIFTH-ROUND DRAW:
Fulham v Southampton
Port Vale or Bristol City v Sunderland
Newcastle United v Manchester City
Leeds United v Norwich City
Mansfield Town v Arsenal
Wolves v Liverpool
Wrexham v Chelsea
West Ham United v Brentford
Ties to be played March 6-9.