Cardiff made it three successive wins in the Sky Bet Championship for the first time this season after thrashing Rotherham 5-0 in Wales.
Goals from Kadeem Harris, Junior Hoilett, Craig Noone and a Kenneth Zohore double gave Bluebirds boss Neil Warnock a deserved victory against his former club.
Warnock took the Millers on an 11-game unbeaten run which saved them from the drop last term.
But now, while he has steered Cardiff up to 12th, relegation to League One is looking more of a certainty for Rotherham, with the club 15 points from safety.
Cardiff took the lead in the 11th minute thanks to Harris' third goal in two games. The Millers failed to deal with Aron Gunnarsson's long throw and the ball fell to Harris, who curled his effort past Richard O'Donnell.
There was a lengthy stoppage when Cardiff's Rhys Healey sustained a serious-looking injury to his left leg and had to be carried off on a stretcher. Hoilett replaced him and scored with his first touch in the third minute of first-half stoppage-time.
The Canada international, who has found first-team chances limited of late, latched on to Ben Purrington's calamitous back pass and kept his cool to give Cardiff a two-goal lead at the break.
Warnock's men added a third strike in the 49th minute after Noone volleyed home Harris' looping cross.
Zohore got in on the act just five minutes later as he blasted the ball in from a tight angle following a neat one-two with Hoilett.
And the Bluebirds talisman netted his second goal just seven minutes from time, expertly lobbing the ball over a helpless O'Donnell.
Rotherham's wait for a first away win of the season goes on, with their last triumph coming at MK Dons in April.
Cardiff boss Neil Warnock: "I was glad to see the second goal go in at half-time and even more happy to see the third one go in because I knew that was the killer.
"I didn't feel good about the game with it being my old club and the situation they're in. I've been there and I know how difficult it can be. So I do wish Rotherham well."
Rotherham boss Paul Warne: "We knew what Neil Warnock's Cardiff were all about with their corners and long throws. So I was hoping my players would be man enough to defend them.
"Coming into this game, with the players we had missing, I was more hopeful rather than expectant of a result.
"But to get drummed like that was embarrassing for the club. The fans don't deserve that and I played a part in it so I apologise."