Following consecutive victories over Toyota Cheetahs, Munster, Zebre and Benetton Treviso, the Blues knew another triumph would go a long way towards securing Champions Cup rugby.
They led 17-6 at the interval thanks to tries from Jarrod Evans and Blaine Scully in front of a 5,763 crowd in the Welsh capital.
Ulster fought back to cut the deficit to just five points early in the second-half but the Blues displayed typical grit and determination to weather the storm before pulling clear.
Kristian Dacey crossed for his side’s third try and while it appeared as though a try bonus-point would evade the Blues there was plenty of drama at the death.
Ulster claimed a dubious consolation try through David Shanahan on 79 minutes but Dillon Lewis put the icing on the cake in injury time while Evans stretched his personal tally to 18-points.
The maximum-haul victory was the perfect sign-off at the Arms Park this season and sees the gap on the Cheetahs cut back to five points, while Connacht are now 13 points adrift in fifth place.
The Blues now turn their attention to the European Challenge Cup quarter-final against Edinburgh in a week’s time. Should they win they will return to the Arms Park for a home semi-final.
Cardiff Blues made a flying start to the encounter and took the lead inside two minutes thanks to fly-half Evans.
Owen Lane and Rey Lee-Lo combined to make the initial in roads on the left and when Willis Halaholo attempted to thread a kick through for Tomos Williams, Craig Gilroy collected and was bundled into touch.
The Blues continued to attack from the lineout with the ball spread right to Lee-Lo, who almost crossed after beating two defenders, and from the next phase Evans ghosted his way through.
Evans converted the score to give his side a seven-point lead after just two minutes.
John Cooney slotted a penalty from 40-metres soon after but the Blues remained in the ascent despite losing Matthew Rees to injury.
Both Halaholo and Lee-Lo were causing Ulster problems with ball in hand and it was the inside centre that created the opening for a stunning second try.
He bamboozled the Ulster defence with his footwork and offloaded to Matthew Morgan, who cut a razor sharp inside line.
Morgan fed Williams, who then lobbed a basketball style pass over the top to Scully, who sliced through before diving over acrobatically.
Evans once again bisected the posts to bring the scores to 14-3 after just 13 minutes.
Ulster rallied mid-way through the half and kicked a pair of penalties to the corner but were held at bay.
There was a moment of controversy shortly before the half-hour mark when Wiehahn Herbst make contact to the head of Evans with his shoulder.
Following a succession of television replays Mike Adamson sent the tight-head prop to the sin-bin to the dismay of the Arms Park crowd. It could, and probably should have been red.
The home side continued to threaten in attack and it appeared as though they had struck for a third sensational try.
Steve Shinger, who was on while Evans went through the HIA protocols successfully, released Halaholo.
The centre had Scully on his outside and scrum-half Williams on his inside who he put away but following an intervention from the TMO, the try was disallowed with Shingler’s flat pass drifting forward.
Cooney and Evans exchanged penalties in the closing stages of the half as the Blues went into the interval leading 17-6.
Danny Wilson’s men continued to fall foul of the referee, with Ulster receiving the benefit of numerous 50-50 decisions and Cooney soon cut the deficit further with a pair of penalties.
With the score now 17-12 it was a pivotal period of the game but the Blues responded with venom.
They went through an eternity of phases and from left to right as they threw everything at Ulster as the crowd grew increasingly frustrated at perceived infringements.
But the Blues maintained their composure and it was a typical break from fly-half Evans that created the scoring moment. He had Scully in support but dummied to the wing before sending a miss pass to Dacey.
Evans converted the effort and soon added a penalty following an earth shattering tackle from Nick Williams.
The young fly-half kept the scoreboard ticking following another period of pressure, to go three scores clear.
David Shanahan powered over in the closing stages for a consolation try, which was awarded despite replays showing his foot was in touch.
The decision clearly incensed Scully and from the restart the USA captain soared into the skies to claim the ball.
Wales’ Capital Region went through an abundance of phases as they fought tooth and nail for a winning bonus-point.
On several occasions it looked as though they would cross the whitewash as Ulster clung on but the champagne moment came as Evans took the ball to the line and offloaded to Lewis to score.