The opener scored his first in the championship ton this season to shut the door on Leicestershire who had forced the home side to follow on 188 runs behind after bowling them out for 340.
Chris Wright took three wickets to reduce Derbyshire to 64 for 3 but Godleman’s unbeaten 100 and 59 not out from Matt Critchley took them to 203 for 3.
Derbyshire’s last wicket pair of Ben Aitchison and Ed Moulton had dug in to take 13 overs out of the day after Ben Mike had struck in the second over of the morning.
Sam Conners edged to second slip but Leicestershire’s bowlers were forced to expend energy to get the final wicket.
See who you can pick out in our fans gallery from Mansfield Town v Derby County
Supercomputer predicts the most likely result for Leyton Orient v Mansfield Town, Bradford City v Newport County, Stockport County v Colchester United and every other League Two game
Former Mansfield Town boss Mick Jones dies aged 75
One more new face in for Mansfield Town as early injuries mount?
Mansfield Town boss Nigel Clough proud of players and fans as Stags are pipped by Derby County in Carabao Cup classic
Ed Barnes finally broke through when he trapped Aitchison in front and when Derbyshire followed-on 188 runs behind, Wright struck immediately.
Tom Wood was drawn into cutting at a ball he should have left and edged to Harry Swindells without a run on the board.
Leus du Plooy went the same way in the seventh over but this time it was late movement from Wright that accounted for the South African.
Wright was by far the most menacing of the Leicestershire bowlers and the 36-year-old struck again in the eighth over after lunch.
He found just enough seam movement to take the edge of Wayne Madsen’s bat and give Hassan Azad a comfortable catch at second slip.
At 64-3, Derbyshire were 125 runs behind but the pitch was still a good one and Godleman and Critchley steered their side to safety.
There was little turn for Callum Parkinson or George Rhodes who was swept for consecutive fours by Godleman to reach 50 from 98 balls.
Critchley dispatched Rhodes over long on for six and by tea, the game was slipping away from Leicestershire who had been in the field for just over five sessions in sweltering heat.
Their last chance vanished when Sam Evans put down a sharp catch off Parkinson at short leg when Godleman was on 80 and Derbyshire were still in arrears.
By then, Critchley had moved to 50 from 101 balls and when Godleman completed his hundred off 183 balls, the teams shook hands on a draw.