In a game played in high winds, scrum half Rhodri Williams gave Scarlets the perfect start with the opening try after a high tempo start.
Hard-working Blues hit back with a well-worked score from back row Macauley Cook as the hosts took a slender lead at the break.
Full back Liam Williams put the hosts back in control with a try just after the restart, but once more Blues struck back with a penalty try after the visitors powered over from a lineout.
A fast and frenetic final 20 minutes of open rugby ensued but it was the hosts who finished the stronger with Stephen Shingler dotting down.
Coaching duo Dale McIntosh and Paul John made a number of changes to the side that claimed a hard-fought victory over Connacht Rugby last time out.
Centre Isaia Tuifua came into the starting line-up for the derby clash while there was also a start for fly half Simon Humberstone with Gareth Davies missing the game through injury.
Robin Copeland made his last appearance for the Blues at eight while Lewis Jones started at scrum half as Lloyd Williams moving to the bench.
A big early drive from the lineout from the Scarlets won them a penalty inside the opening minute, but Rhys Priestland saw his kick badly pushed wide right of the posts in high winds.
The blustery conditions were causing issues for both teams in the opening minutes while Aaron Shingler ripped the ball away to start a Scarlets counter that ended with Jordan Williams kicked out.
Blues, playing against the worst of the conditions, found themselves pinned back in the first ten minutes with a big hit dislodging ball from opposite number Shingler as the visitors held firm.
Jordan Williams started another counter attack from deep as Scarlets looked to offload in the tackle before a neat break from Josh Ball and inside pass sent scrum half Rhodri Williams over for the opening try of the night.
Blues stole lineout ball for a first attack in the home half with Alex Cuthbert and Dan Fish taking the ball on before Isaia Tuifua smashed men aside in midfield and left Joe Snyman on the floor.
They showed great composure to recycle the ball and after Fish stepped away from Jordan Williams, as he shot out the line, the away team worked the ball left with Filo Paulo firing the final pass for Cook to crash over in the left corner.
Priestland nearly picked off Copeland’s pass for an intercept score on halfway before Harry Robinson, playing against the side he will join this summer, streaked away into space.
Blues secured a penalty, for side entry at the breakdown, and Humberstone confidently nudged over, despite the gusty left to right winds, for the lead just after the midway point of the half.
Fish nearly created a second try out of nothing as he collected a clearing kick, chipped in behind and then hacked the loose ball ahead on the volley only for it to run dead as he was winning the foot race.
The game was suddenly being played all in the Scarlets half, with Fish impressing from deep and putting Liam Williams under real pressure with his range of kicks.
A mistake from Steve Shingler, as he flew out the line and got left behind by a side-stepping Tuifua, saw Blues on the attack and the supporting Jones showed his pace to run around the full back but he was hauled down short of the line by covering men.
Scarlets looked to repeat the feat in the opposite corner as they kept the ball alive out the tackle, but this time Rhodri Williams was bundled into touch by a combination of Fish and Robinson.
A penalty against Copeland on the stroke of half-time gave Priestland the simple chance to put the home side 10-8 ahead at the break.
Scarlets started the second half with much more tempo and direction and after the forwards took ball on it was Liam Williams who showed his quick feet and power to glide over near the posts for a decisive second home try.
Only a superb tap tackle from Copeland stopped a marauding Priestland from adding a third.
Scarlets were penalised at the lineout and Blues opted to kick for the corner rather than the posts in the lottery of the high winds. The decision paid off immediately as the visitors drove over and the referee awarded a penalty try as Scarlets pulled it down.
Blues started to unload the replacements bench to look for a spark with the game on a knife-edge going into the final quarter and Ellis Jenkins quickly made his mark with a key turnover at the breakdown.
Jenkins was involved again minutes later and left with a nasty cut to his head after catching the knee of Sione Timani with play immediately stopped as the young flanker was taken off.
Scarlets extended the lead to five points with a kick from Stephen Shingler, but Blues came again with the departing Copeland and Bradley Davies putting in a shift until the end as they exploited gaps.
The home side looked to cap the performance and did so when Shingler rolled over after quick handling from the hosts in the final minutes to complete the rugby on show.
Timeline:
13m R Williams t Priestland c 7-0
19m Cook t 7-5
24m Humberstone p 7-8
39m Priestland p 10-8
41m L Williams t S Shingler c 17-8
54m Penalty t Humberstone c 17-15
69m S Shingler p 20-15
75m S Shingler t S Shingler c 27-15
Cardiff Blues: 15 Dan Fish (T Williams 77), 14 Alex Cuthbert, 13 Cory Allen, 12 Isaia Tuifua (Hewitt 61), 11 Harry Robinson, 10 Simon Humberstone, 9 Lewis Jones (L Williams 59); 1 Gethin Jenkins (Davies 73), 2 Matthew Rees (Dacey 70), 3 Taufa’ao Filise (Andrews 62), 4 Bradley Davies, 5 Filo Paulo (Dicomidis 77), 6 Macauley Cook, 7 Josh Navidi (Jenkins 59 (Navidi 67)), 8 Robin Copeland
Replacements: 16 Kristian Dacey, 17 Thomas Davies, 18 Scott Andrews, 19 Chris Dicomids, 20 Ellis Jenkins, 21 Lloyd Williams, 22 Dafydd Hewitt, 23 Tom Williams