Leigh Halfpenny kicked four first-half penalties to give the hosts a 12-6 half-time lead, despite Ospreys' superiority in the scrum.
But after the interval Ospreys inflicted an onslaught with 27 unanswered points as Alun-Wyn Jones and Adam Jones crashed over the whitewhash before Tom Smith scored a late try to seal a crucial bonus point.
It was a reasonable start from the Blues, and they took an early lead as Halfpenny was successful with an effortless penalty.
Blues centre Gavin Evans, who signed a new two-year deal this week, was then sin-binned as referee George Clancy penalised him for a deliberate knock-on.
Fly-half Dan Biggar kicked the three points to level after ten minutes, but then squandered his next opportunity - the first time he had done so in 13 attempts - with a wayward penalty.
Ospreys were beginning to look threatening, but on 24 minutes, Halfpenny tucked away another penalty to open up a three point lead against the run of play as Ospreys' superiority in the scrum was starting to tell.
Biggar made no mistake this time as he restored parity again just before the half hour mark with a well-taken penalty.
However, a pair of penalties from the ever-impressive Halfpenny gave the hosts an unlikely 12-6 lead at half-time.
Ospreys came charging out after the restart, and began pulverising the Blues scrum once more.
Clancy then sin-binned Blues fly-half Ceri Sweeney for a deliberate knock-on on 53 minutes before Biggar added the three points to cut down the lead to 12-9 as the away side sensed blood.
It only took another five minutes for Ospreys to square the match for a third time as further pressure forced another penalty, which Biggar obliged.
Just after the hour mark, Ospreys took the lead for the first time in the match. Alun-Wyn Jones went over the whitewash following a well-worked move.
Biggar kicked the extras to move Ospreys into a 19-12 lead. They were not done yet, though, and another attack allowed prop Adam Jones to crash over with a poacher's finish.
Biggar landed the conversation and Ospreys appeared out of sight at 26-12 with just over ten minutes remaining.
The Blues scrum failed them yet again, and Tom snatched a try in the dying embers with Biggar adding the final two points to round off a miserable few weeks for the Blues.
|Cardiff Blues Score Card|
|Ospreys Score Card|