It was drama nearly from the off in such a big game near the bottom of the table. Rotherham started the brighter and Jordan Hugill hit the bar early on, before Cardiff took the lead with their first real attack on 11 minutes. Perry Ng's cross found Kion Etete in the box, and he headed in.
Rotherham rebuilt their momentum and found a deserved equaliser on 37 minutes. It also came from a ball into the box as Wes Harding found Chiedozie Ogbene, who thumped a header into the roof of the net.
Cardiff then really ought to have restored their lead in first-half stoppage-time. Conor Coventry was guilty of bringing down Jaden Philogene in the box - or at least on the edge of the box - but Sory Kaba rattled the crossbar with his attempt from 12 yards.
The second half seemed to dwindle a little as both sides played towards a point, but in the 87th minute Kipre capitalised on Rotherham's failure to clear from a free-kick, flashing home a fierce drive from close range to seal a vital Cardiff win.