Matt Ritchie, Callum Wilson, Marc Pugh, Harry Arter and Yann Kermorgant were all on target as Bournemouth extended their unbeaten run to 12 games.
Kenwyne Jones and Sean Morrison, who struck twice, responded for the visitors – but Eddie Howe’s held on to win a thrilling match.
Cherries top scorer Wilson got the better of Kim Bo-kyung inside 39 seconds as he sprinted clear down the left wing and cut back a perfect cross for winger Ritchie to slide home from eight yards and give Bournemouth the lead.
Only a slight deflection denied Coventry recruit Wilson a second goal as his effort lobbed over David Marshall’s bar on 24 minutes.
The visiting fans thought they had equalised with less than 10 minutes to go until half-time – but Bournemouth defender Steve Cook blocked the effort of Jones.
But it was the home side who struck next as Bluebirds man Kim was again embarrassed down the wing. Daniels squared the ball to Arter, who impressively found the bottom right hand corner from outside the box to make it 2-0.
The action-packed first half still had more to give as Adam Le Fondre picked up a loose ball and galloped towards the Bournemouth defence before finding strike partner Jones, who was able to cut the deficit to 2-1.
However, Cardiff’s joy at the breakthrough was short-lived as midfielder Pugh curled a delightful effort over a stranded Marshall in the Bluebirds goal from outside the area to restore the hosts’ two-goal cushion going into the break.
The hosts allowed their Welsh opponents back into the contest again less than three minutes after the restart, Whittingham picking out defender Morrison – who nodded a thumping header past Artur Boruc to make the score 3-2.
Controversy followed just moments later as Cardiff stopper Marshall looked to handle the ball outside of the area. Referee James Adcock consulted with both the linesman and the fourth official – but Marshall escaped as none of the officials appeared to see the incident.
Kermorgant was brought on to replace Brett Pitman in the second half and the former Charlton striker made an almost instant impact, curling a stunning free-kick past Marshall from 25 yards to make it 4-2 to the home side.
Morrison set up a grandstand finish when he netted his second goal from a Whittingham corner.
But the ever-lively Wilson hit late on the counter-attack to seal all three points for the home side, before Cardiff substitute Kadeem Harris hit the final chance of the game – an audacious overhead kick – high and wide.