Jordan Bowery scored the only goal as Chesterfield moved off the bottom of League One and extended Tranmere's winless run to 11 matches.
The hosts nearly went ahead when Jack Lester intercepted a short backpass but Rovers defender Ian Goodison made a goalline clearance to keep it at 0-0.
Tranmere's Owain Fon-Williams saved from Nicky Ajose before Tommy Lee denied Andy Robinson at the other end.
Bowery grabbed the winner with a low shot from 12 yards after Lester's pass.
VIEWS FROM THE DRESSING ROOM
Chesterfield manager John Sheridan tells BBC Radio Sheffield:
"(It was) very hard, I expected that from Tranmere, they're a difficult team to play against.
"They don't concede many goals, but to get three points from the game is what we were after.
"I thought we started a bit on edge, which is to be expected, you know we're in a position we don't want to be in.
"But I thought we got into the game then it was a very workman-like performance and we went on to win the game."