Fly-half Rhys Patchell scored 19 points for the hosts with a try, four conversions and three penalties.
Munster's Darren Sweetnam went over for the opening try and Macauley Cook responded.
The hosts were never behind after Patchell's conversion as Matthew Rees and Garyn Smith also crossed.
Munster stay fifth in the table while Blues go level on 39 points with Ospreys but stay ninth, a place below their Welsh rivals.
Fly-half Keatley's early penalty was followed by centre Francis Saili sending wing Sweetnam over at the corner.
Patchell's first penalty came as Munster continued to dominate the opening quarter, but the hosts took the initiative before the break.
Number eight Josh Navidi broke away to pave the way for flanker Cook to touch down.
Keatley and Patchell exchanged penalties before hooker Rees' try increased the hosts' lead.
Hooker Sherry replied for Munster only for centre Smith to intercept and race to the line from 45 metres.
Patchell claimed Blues' bonus-point try as he went clear and after back-rower O'Donoghue went over, Jarrod Evans' last-minute penalty ensured Munster went home without a losing bonus point.
Cardiff Blues: Dan Fish; Aled Summerhill, Garyn Smith, Rey Lee-Lo, Blaine Scully; Rhys Patchell, Lloyd Williams; Brad Thyer, Matthew Rees (capt), Salesi Ma'afu, Cam Dolan, Josh Turnbull, Macauley Cook, Ellis Jenkins, Josh Navidi
Replacements: Kristian Dacey, Thomas Davies, Taufa'ao Filise, Lou Reed, Manoa Vosawai, Lewis Jones, Jarrod Evans, Gavin Evans
Munster: Andrew Conway; Darren Sweetnam, Francis Saili, Rory Scannell, Ronan O'Mahony; Ian Keatley, Duncan Williams; James Cronin, Mike Sherry, John Ryan; Dave Foley, Billy Holland (capt); Jack O'Donoghue, Dave O'Callaghan, Robin Copeland.
Replacements: Niall Scannell, Dave Kilcoyne, Stephen Archer, Sean McCarthy, Jordan Coghlan, Cathal Sheridan, Johnny Holland, David Johnston.
Cardiff Blues earned a thrilling bonus-point win over Munster, denting the Irish side's bid to make the Pro12 play-offs.