For a while it looked as if the play-off chasing Scarlets were about to upset the formbook and come away from the RDS Arena with a memorable victory but they could not hold on.
McFadden was one of four returning from Ireland duty, including Sean Cronin, David Kearney and Eoin Reddan but proceedings were scrappy early on.
Scarlets fly-half Stephen Jones made no mistake with an early three-pointer for the visitors on six minutes but an instant reply from the European champions saw McFadden level things up just moments later.
Leinster, not at their usual best early on, were sloppy in the ruck and allowed Jones an opportunity to reinstate Scarlets' three-point advantage - a chance he missed.
The Irish outfit almost grabbed the first try of the game on 20 minutes but resolute Scarlets defending halted their progression before Nigel Davies' side set up a counter attack of their own.
Neat play from the Scarlets allowed Dan Newton to race clear and over the whitewash for the first try of the game after 24 minutes. Jones put the extras over for a seven-point advantage.
The table-toppers almost restored parity two minutes later. A great counter-attack from winger Fionn Carr saw the former Connacht man race towards the line, but a knock-on brought the break to a premature end.
More impressive work from the hosts, this time in the scrum, gave McFadden a chance to reduce Leinster's arrears but he dragged his penalty wide on the half-hour mark.
Leinster came flying out of the traps in the second period and McFadden, sloppy with his handling on occasions in the first period, made no mistake as he waltzed his way past the Scarlets defence to score before knocking over the extras.
With the game heading towards a bit of a lull, Newton and McFadden exchanged penalties to set up a tense final quarter.
And with both sides were pressing for the victory McFadden had a great chance to seal the victory but sent a penalty wide five minutes from time.
But it was not finished there and the 25-year-old made no mistake with his last-ditch effort to maintain Leinster's lead at the top of the table.
|Leinster Rugby Score Card|
|Scarlets Score Card|