The unbeaten Welsh side turned over an Ulster side that came into the game on the back of a 30-3 win over Toulouse.
But the Scarlets, buoyed with their own 32-25 success at London Irish, did just enough to win with tries for Regan King and Mark Jones as well as 11 points from the boot of new Wales captain Stephen Jones.
Ulster replied with five David Humphreys penalties.
The home side made a blistering start when King crossed in the fourth minute for the opening unconverted try.
Paul Steinmetz's clearance kick was charged down by King, who picked up and ran over from 30 metres, outpacing Humphreys on the way.
In an entertaining opening the Scarlets dominated possession and looked to have scored a second try when King put Mark Jones over, but the score was disallowed after TV replays showed the wing knocked on after being well tackled by Paddy Wallace.
Ulster gradually came back in to the contest and looked dangerous with ball in hand from first phase, but after one attack they lost Bryn Cunningham with a shoulder injury.
And it was the Scarlets who got on the scoreboard again when Stephen Jones, on his 50th Heineken appearance for the Welsh region, put over a penalty on 28 minutes to make it 8-0 after Neil Best obstructed Gavin Evans.
That score was cancelled out six minutes later when Humphreys converted a penalty after Inoke Afeaki was spoken to by referee Tony Spreadbury for obstruction.
Ulster's comeback continued three minutes later when Humphreys split the uprights with a penalty goal from near halfway.
Referee Spreadbury went to the video replay after Barry Davies followed up a kick over the line by outside-half Jones, but the full-back never had control of the ball.
After the Scarlets began to get the upper hand up front they won a penalty which Stephen Jones converted to give the home side an 11-6 half-time lead.
The Scarlets had that advantage cut to just two points seven minutes into the second period from a Humphreys penalty goal, awarded when Afeaki failed to release at a ruck.
With the pressure building on the West Wales region they responded with a second try through Mark Jones who was put over on the left by fellow wing Dafydd James in a move that saw the ball go through 26 pairs of hands.
Jones converted but the Ulstermen came back at the Welsh side through Humphreys, who put over his fourth and fifth penalties on 60 minutes and 64 minutes to make it 18-15.
Ulster's momentum was snuffed out however in the 71st minute when Stephen Jones put over his third penalty to give Llanelli a six-point cushion.
But they were reduced to 14 men in the final minutes when Craig Dunlea was yellow-carded and had to hang on.
Ulster had a penalty near the line with two minutes to go, but Gavin Thomas's superb steal from the resulting ruck ensured that the scarlets were able to run down the clock.
The scorers:
For the Scarlets:
Tries: King, Mark Jones
Cons: Stephen Jones
Pens: Stephen Jones 3
Drop goals:
For Ulster:
Tries:
Cons:
Pens: Humphreys 5
Drop goals:
Llanelli Scarlets: 15 Barry Bavies, 14 Dafydd James, 13 Regan King, 12 Gavin Evans, 11 Mark Jones, 10 Stephen Jones, 9 Dwayne Peel, 8 Alix Popham, 7 Gavin Thomas, 6 Simon Easterby (c), 5 Inoke Afeaki, 4 Vernon Cooper, 3 Deacon Manu, 2 Matthew Rees, 1 Iestyn Thomas.
Replacements: 16 Aled Gravelle, 17 Craig Dunlea, 18 Adam M Jones, 19 Nathan Thomas, 20 Clive Stuart-Smith, 21 Ceiron Thomas, 22 Matthew Watkins.
Ulster: 15 Bryn Cunningham, 14 Andrew Maxwell, 13 Paul Steinmetz, 12 Paddy Wallace, 11 Andrew Trimble, 10 David Humphreys, 9 Issac Boss, 8 Roger Wilson, 7 Stephen Ferris, 6 Neil Best, 5 Matt McCullough, 4 Justin Harrison (capt), 3 Bryan Young, 2 Rory Best, 1 Justin Fitzpatrick.
Replacements: 16 Paul Shields, 17 Simon Best, 18 Tim Barker, 19 Kieron Dawson, 20 Kieran Campbell, 21 Kevin Maggs, 22 Scott Young.
Referee: Tony Spreadbury