Leinster, who reintroduced Heaslip, Rob Kearney and Luke Fitzgerald to league action, went ahead in the third minute when McFadden landed his first penalty.
The home side welcomed another 2009 Lion, Mike Blair, back into their starting line-up. The Scotland scrum half captained Edinburgh, with centre Nick De Luca and flanker Alan MacDonald also earning recalls.
Edinburgh quickly levelled through Paterson but the first half was error-strewn and largely forgettable and neither side could gain the upperhand in open play.
Rob Moffat's league leaders had more of the ball in open play, using Ben Cairns and De Luca to forage through the middle.
Time and again, Leinster's defence was up to the task with Cian Healy, Heaslip and former Edinburgh lock Nathan Hines putting into some forceful hits.
Big wingers Tim Visser and Mark Robertson looked dangerous when the ball came their way and Leinster had to dig themselves out of trouble on occasion through the kicking of McFadden, out-half Shaun Berne and returning full-back Kearney.
With the sides cancelling each other out, place-kicks became so vital. Phil Godman was off target with one midway through the half, before Paterson kicked Edinburgh in front for the first time on the half-hour mark.
The Scots deserved to be further ahead on the balance of play, and Visser had to bundled into touch as he threatened to break the try deadlock.
Leinster were beginning to get in trouble for misdemeanours at the breakdown and young prop Healy saw yellow, five minutes before the break, for illegally slowing up Edinburgh ball.
As is so often the case, going down to 14 men seemed to have a galvanising effect. McFadden punted an injury-time penalty through the uprights for a 6-6 half-time scoreline and followed up with two excellent penalties in the opening minutes of the second half.
McFadden missed one effort in between, but continued to take on the place-kicking duties despite the presence of Jonathan Sexton on the pitch, the man who kicked Leinster to European glory at this very ground last May.
Edinburgh had looked the more likely to score a try in the opening 40 minutes and just moments after losing lock Scott MacLeod to the sin-bin and going 12-6 down, they struck for the only try of the night.
Allister Hogg carried forward with menace off the back of a scrum and centre Cairns prized his way through a gap in the middle, slashing his way through and beating the cover to score under the posts.
Credit to John Houston who made the initial incision and Craig Hamilton who provided the try-scoring pass.
Play was kept between the 22s for the most part. Paterson, who tagged on the conversion, threatened from deep and Visser was inches away from a try, Sexton doing well to get back and touch down after a well-judged chip and chase by the Dutchman.
The breakdown was the key area, where the match would be won and lost, and Leinster engineered two more kicks, on 62 and 66 minutes, which the in-form McFadden had no trouble in converting.
Flanker Sean O'Brien should be singled out too for nabbing some timely turnovers for Michael Cheika's men.
The game lulled briefly as a raft of replacements came on, before it built again for a final crescendo. Paterson's brace of penalties saw Edinburgh close in on their fourth win of the current campaign.
But luck was not on the Scottish star's side at the death, as Sexton's smartly-struck drop goal from 35 metres out proved to be the match-winning kick.
|Edinburgh Rugby Score Card|
|Leinster Rugby Score Card|