Three goals in the first half at New York Stadium earned City an important away win in the Championship.
With Millwall losing Cardiff have opened a 13 point gap over the Londoners who are in 22nd place.
Cardiff are now 13th in the table and have lost just once in the last seven games. The defeat was the unlucky reverse against Wolves on the weekend. That game saw a red card for Peter Whittingham with his place tonight going to Joe Ralls.
And Ralls set up City's opening goal with a corner that found Bruno Manga's head in the 24th minute.
Two minutes later and Federico Macheda (pictured), a surprise starter, volleyed City into a two goal lead.
And soon after Conor McAleny enjoyed space in the box to poke home City's third.
David Marshall was subbed at half time (waiting for an update as to why) and strikers Eoin Doyle and Kenwynne Jones came off the bench in the second half.
Rotherham did pull one back in the 80th minute when Ward had a free header but it turned out to be just a consolation and did not dampen the celebrations of the 396 City fans at the game.
City face Charlton at CCS this weekend before an away trip Brentford. Two very tough games. Winning tonight has lifted a load of pressure.
Starting Line Ups:
Rotherham: Collin, Hunt, Arnason, Broadfoot, Fryers, Newton, Green, Smallwood, Pringle, Ward, Derbyshire
Subs: Thompson, Frecklington, Milsom, Richardson, Sammon, Hammill, Clarke-Harris
Cardiff: Marshall, Connolly, Peltier, Morrison, Ecuele Manga, Gunnarsson, Ralls, Kennedy, McAleny, Macheda, Revell.
Subs: Moore, Fabio, Noone, O'Keefe, Harris, Doyle, Jones.