Tommy Rowe fired home from distance after 10 minutes to end Rovers’ five-game goal drought.
Rekeem Harper hit the post for Crewe and Chris Long wasted a good chance during the visitors’ best spell just before half time.
Josh Martin lashed home Rovers’ second soon after the restart as they went on to end a six-game sequence without a win and secure only their second win at home in 11 attempts.
Crewe’s defeat confirmed their relegation to League Two.
None of the four sides above Rovers won meaning the gap to safety is now five points with four games to play.
“I think we started well,” said McSheffrey. “I think we deservedly went ahead.
“We could’ve been ahead by two or three quite comfortably.
“And then we got a little bit sloppy in the last 15 minutes of the first half. We were having too many touches, we were loose on the ball.
“It gave them a bit of momentum and they should’ve went in all square to be honest. They missed a good chance and they hit the post and we rode our luck a bit.
“I said to the boys at half time ‘we need to better, we’re letting them off the hook. Concentrate on your touch, recover faster, sprint around more’.
“I think they felt it was enough just to be one up but it obviously wasn’t.
“We then started well again and scored at a really good time.
“You want to go and score three or four but we let them in a bit again and I thought we could’ve just managed the game a little bit better and dominated the ball better.
“But that’s nitpicking. The lads haven’t been in that position for a while, 2-0 up, and you can understand why the nerves creep in with it being such a big game.
“I’m delighted with the win. I thought the work rate was good and it was good to see a few of the lads get 90 minutes again.
“The other side of the game from the likes of Clayton, Bostock and Smith was superb.
“They did the ugly things very well and put out a lot of fires.
“Ro-Shaun Williams saved us a couple of times on counter attacks by reading the pass and making good interceptions.
“We did the ugly things really well today.”