Former Scarlets pair Mike Phillips and Andy Powell helped the Blues to their first Celtic League win of the season.
Blues (10) 20
Tries: Phillips, Powell
Cons: Robinson (2)
Scarlets (3) 16:
Tries: Mackey, Byrne
Pens: Hercus, Bowen
Phillips benefited from a slice of luck to score a breakaway try to give the Blues a 10-3 half-time lead.
Paul Mackey's early second-half try closed the gap to two points, but the lead was restored when Powell crossed.
Nicky Robinson's late drop-goal opened a nine-point lead with 10 minutes to go, and that proved crucial as Scarlets wing Lee Byrne scored in injury time.
Desperate Blues defence had held firm in the dying moments, but deft hands from Liam Davies sent Byrne over in the right corner for a deserved bonus point score.
The Scarlets opened the scoring on three minutes with a Mike Hercus' penalty, but the Blues took the lead they were never to relinquish inside 10 minutes.
The Scarlets looked to have been in control of possession deep in Blues half, but Aisea Havili knocked on as he was tackled at the base of the ruck.
The ball rebounded into Phillips' path in midfield and the scrum-half - a summer recruit from Stradey Park - won the race against Havili to gather his own long kick forward and dive over. Robinson converted.
The Blues stretched their lead to 10-3 on the half hour mark through a Robinson penalty, but the error-strewn match struggled to catch fire as both sides struggled to build any pressure.
A Matthew Watkins midfield break produced the best first-half attacking platform for the Scarlets, and prop Iestyn Thomas was eventually denied by a whisker as he drove from a ruck.
But the visitors needed just three minutes of the second-half to score.
Fly-half Hercus took three Blues defenders out of the game with a superb floated pass to the right wing where Byrne took the move on with a burst on the outside.
He found Paul Mackey on his inside and the replacement had a clear run home.
The Blues then hit back with a move straight off the training ground.
Robinson's high cross-field kick into the left corner was deliberately knocked down by Craig Morgan for Powell - another summer recruit - to cross.
Robinson landed the difficult conversion to open a nine-point lead.
The Scarlets, who made six changes to the side that beat Borders on Sunday, began to ring the changes and replacement fly-half Gareth Bowen cut the gap to six points with a 56th-minute penalty.
The Blues enjoyed a purple patch around the hour mark, with Robinson prominent with neat breaks and defence-splitting passes.
Scarlets defence held firm, though, but the fly-half gave the Blues some crucial breathing space with a 70th-minute drop-goal.
A late Scarlets rally resulted in Robin Sowden-Taylor being sin-binned for persistent offending, and the visitors made the most of the advantage when Byrne scored with the final move of the match.
Blues number eight Andy Powell:
"We were under pressure and so it's just awesome to win a game.
"We should have won the last two, but we've got one now and we're away."
Blues: Macleod; Czekaj, R Williams (capt), Davies, Morgan; N Robinson, Phillips; Yapp, R Thomas, Evans, Jones, Sidoli, Molitika, Sowden-Taylor, Powell.
Replacements: L Thomas for Davies (44), Quinnell for D Jones (69), Lewis for Molitika (79).
Not Used: Llewellyn, G Williams, R. Powell, Nuthall.
Scarlets: B Davies; Byrne, Watkins, James, Havili; Hercus, McDonald; I Thomas, Hawkins, J Davies, Cooper, Louw, Easterby (capt), G Thomas, Popham.
Replacements: Mackey for B Davies (44), Bowen for Hercus (53), L. Davies for McDonald (53), Williams for I. Thomas (47), Gravelle for Hawkins (67), A Jones for Louw (67), Quinnell for G Thomas (67).
Referee: Nigel Owens (WRFU)