Derby players will wake up this morning wondering how they lost so convincingly after dominating the first half.
Midfielder John Eustace, on loan from Watford, had two strong penalty appeals turned down, either side of his acrobatic volley in the 14th minute which forced Cardiff keeper Stuart Taylor into a smart, diving save.
In front of an 18,403 crowd, the Welsh club took the lead against the run of play when Roger Johnson headed Peter Whittingham's floating free-kick past keeper Stephen Bywater in the 17th minute.
Gavin Rae scored his first goal of the season in the 61st minute and Jay Bothroyd prodded Whittingham's corner home two minutes later.
With 11 minutes left, substitute Eddie Johnson scored a fourth goal and still had time for an injury-time own-goal to ease Derby's misery.
Cardiff boss Dave Jones said: 'We didn't play as well as we are capable of but our finishing was clinical.
'Derby started well but the second goal knocked the stuffing out of them and the third one killed them off. All we can do is keep the pressure on the top two and keep the dream alive.'
Derby boss Nigel Clough raged: 'We lost because Cardiff's two central defenders were outstanding and our defence wasn't.'