Chesterfield started the game brightly and Sam Hird had a chance in the opening minutes but headed over from Jimmy Ryan's corner.
Jamie McGuire had the first chance of the game for the visitors but couldn't find the target with a speculative effort.
After a spell of pressure the visitors took the lead in the 37th minute through Calvin Andrew after he met Ben Hutchinson's corner with a powerful header. The striker nearly scored his second minutes later but saw his effort hit the post.
Sam Morsby almost found an immediate equaliser for the hosts but he saw his header come crashing off the bar.
After the break Ryan Tafazolli wasted a good chance for Mansfield but headed wide and Marriot denied Doyle again after the ball broke kindly to him inside the box.
Gary Roberts saw red for the home side in injury time as Mansfield held on to claim all three points.