Media playback is not supported on this device
The Stags dominated for long spells and had the best of the chances, but twice found themselves behind.
For the second successive home game the Stags lost possession and were punished on the counter-attack as Jordan Slew ran onto the ball in his own half and raced clear on 14 minutes, leaving Jamie McGuire in his wake, and he slotted home across Brian Jensen and off the far post.
It was their only effort of the half with Argyle keeper Luke McCormick by far the busier.
He stopped a tame early Matt Green effort, tipped away a curling James Baxendale shot, made a fine block from Ashley Hemmings and watched a Mitch Rose blast sail over the bar.
But Mansfield were level on 58 minutes as Green flicked on a Rose cross and Hemmings blasted home a rising shot under the far angle from the far post.
Hemmings twice came close to another, firing just wide and hitting a post.
But the Pilgrims, who have only lost once in 16 games snatched it as Slew fed Fox to fire home an excellent finish from 18 yards.
Report supplied by the Press Association.
Match ends, Mansfield Town 1, Plymouth Argyle 2.
Second Half ends, Mansfield Town 1, Plymouth Argyle 2.
Delay over. They are ready to continue.
Delay in match Sonny Bradley (Plymouth Argyle) because of an injury.
Malvind Benning (Mansfield Town) wins a free kick on the right wing.
Foul by David Ijaha (Plymouth Argyle).
Foul by Malvind Benning (Mansfield Town).
Ryan Donaldson (Plymouth Argyle) wins a free kick on the right wing.
Yann Songo'o (Plymouth Argyle) wins a free kick in the attacking half.
Foul by Darius Henderson (Mansfield Town).
Foul by Darius Henderson (Mansfield Town).
Ben Purrington (Plymouth Argyle) wins a free kick on the right wing.
Foul by Darius Henderson (Mansfield Town).
Yann Songo'o (Plymouth Argyle) wins a free kick in the attacking half.
James Spencer (Plymouth Argyle) is shown the yellow card for a bad foul.
Krystian Pearce (Mansfield Town) wins a free kick on the left wing.
Foul by James Spencer (Plymouth Argyle).
Substitution, Mansfield Town. Danny Rose replaces Lee Collins.
Yann Songo'o (Plymouth Argyle) wins a free kick on the left wing.
Foul by Malvind Benning (Mansfield Town).
Attempt saved. Rhys Bennett (Mansfield Town) right footed shot from outside the box is saved in the centre of the goal.
Substitution, Plymouth Argyle. David Ijaha replaces Jordan Slew.
Attempt missed. Ashley Hemmings (Mansfield Town) left footed shot from the left side of the box misses to the right.
Substitution, Mansfield Town. Darius Henderson replaces James Baxendale.
Goal!  Mansfield Town 1, Plymouth Argyle 2. David Fox (Plymouth Argyle) right footed shot from outside the box to the bottom left corner. Assisted by Jordan Slew.
Foul by Yann Songo'o (Plymouth Argyle).
Matt Green (Mansfield Town) wins a free kick in the defensive half.
Corner,  Plymouth Argyle. Conceded by Chris Clements.
Corner,  Plymouth Argyle. Conceded by Malvind Benning.
Corner,  Plymouth Argyle. Conceded by Krystian Pearce.
Substitution, Mansfield Town. Jack Thomas replaces Mitch Rose.
Mitch Rose (Mansfield Town) wins a free kick in the defensive half.
Foul by Ben Purrington (Plymouth Argyle).
Attempt missed. Graham Carey (Plymouth Argyle) left footed shot from outside the box is too high.
Attempt missed. Yann Songo'o (Plymouth Argyle) right footed shot from outside the box is high and wide to the right.
Attempt saved. Ashley Hemmings (Mansfield Town) left footed shot from outside the box is saved in the top left corner.
David Fox (Plymouth Argyle) wins a free kick in the defensive half.
Foul by Rhys Bennett (Mansfield Town).
James Baxendale (Mansfield Town) wins a free kick in the attacking half.
Foul by David Fox (Plymouth Argyle).
David Fox's first goal for Plymouth Argyle 10 minutes from time saw them into the hat for the second round of the FA Cup after a hard-fought win at Mansfield Town.