Jimmy Spencer's late winner eased Morecambe's relegation worries and dented Rotherham's play-off hopes.
Spencer's angled drive from Kevan Hurst's pass eight minutes from time moves the Shrimps up to 16th.
Rotherham hit the post, had an effort cleared off the line and went close through Marcus Marshall and Nicky Law.
But they remain two points outside the play-offs as Morecambe, who saw Garry Hunter miss a simple header, snatched an important win.
POST MATCH REACTION
Rotherham caretaker manager Andy Liddell told BBC Radio Sheffield:"It wasn't good enough, the players know that. There looked like a distinct lack of confidence out there and that was quite strange, I'm a bit lost how to explain that because even though we got beat on Tuesday we didn't play poorly we just made some mistakes.
"Today we played poorly, there looked like a lack of confidence, there was a lack of quality out there to be honest with you from both teams, I thought it was a poor game.
"We made too many mistakes and it resulted in us losing the game, but we lost the game because eight, nine even 10 of our players didn't play very well."