A 12th minute header from Cardiff striker Peter Thorne secured three points for his side as they climbed to second place in the table.
Thorne outjumped Kevin Dawson at the far post and planted a firm header into the top left-hand corner of Carl Muggelton's goal.
However, had Chris Brandon scored a 21st minute penalty then this game could have slipped away from the Bluebirds.
Chesterfield were awarded their penalty after Chris Barker had blatantly tripped Glynn Hurst just inside the box.
But Brandon sent his penalty high and wide of Neil Alexander's goal and with it went Chesterfield's best chance of getting anything out of this game.
City were far from impressive and the visitors will feel more than aggrieved that they didn't get anything out of this game. Only a superb save from City keeper Alexander with five minutes remaining helped secure three points for the Bluebirds.
Andy Campbell had a late chance to make it two but he smashed his shot off the crossbar and following the far from convincing 1-0 victory, Bluebirds manager Lennie Lawrence was a relieved man.
He said: "Credit to Chesterfield they came he with a system that caused us problems and they could've got something out of this game.
"If they score the first-half penalty then the game takes on a very different complexion. But they didn't and we ground out the win.
"It wasn't pretty but these are the types of game we need to win if we are to go up this year.
"We defended badly and they attacked well but they just couldn't get the goal." Chesterfield manager Dave Rushbury was left to rue the first-half missed penalty.
He said: "I thought we deserved at least a point from the game. If the penalty goes in then it becomes a completely different game. But he didn't and that's the way it goes.
"I fully expected him to score, he's already scored two this season but for some reason he missed the target.
"I don't attach any blame to him though as that's just the way football goes."