Oldham defender Cameron Dummigan was the hero as his two goal-line clearances prevented Mansfield from upsetting their League One opponents.
League Two Mansfield had the better of the match, with Reggie Lambe also putting a volley over from five yards.
Dummigan cleared shots from Matt Green and Nathan Thomas as the Stags dominated the second half.
But Mansfield could not record a second win in seven FA Cup meetings against Oldham.
Watch every goal from the FA Cup first round here.