The province will enter the play-offs as top seeds, but they will want to forget this error-strewn encounter as Edinburgh, who were hammered by Munster last week, finished just two points in arrears.
Indeed, Edinburgh led 6-5 at the interval thanks to two Greig Laidlaw penalties, with a try from young flanker Jordi Murphy in between them, but Leinster, turning with the wind behind them, had the better of the second period.
Jimmy Gopperth landed a penalty and converted Dave Kearney's 57th-minute touch down to get Leinster over the finish line, albeit with Tim Visser's converted try making them sweat right until the end.
Injury-hit Edinburgh lost winger Sam Beard to an early knock, but hit the front thanks to an opening penalty from the Gloucester-bound Laidlaw.
Leinster replied within four minutes, Gordon D'Arcy and Dave Kearney combining to good effect on the left wing before Murphy spun out of Dave Denton's challenge to plunge over from close range.
Gopperth missed the conversion and after Richard Strauss had to hobble off, Leinster had a let-off when Carl Bezuidenhout's try was ruled out for a forward pass from Visser.
Having leaked 55 points to Munster, Edinburgh looked a very different team here and frustrated the hosts for much of the first 40 minutes.
The Scots were severely hampered by two more injuries as No 8 Denton and centre Matt Scott were forced off in quick succession.
But they dug their heels in and pressed from turnover ball with prop Willem Nel just held up by Leinster's retiring duo Leo Cullen and Brian O'Driscoll.
Edinburgh managed to edge in front for the break as O'Brien infringed at a ruck close to the Leinster line and Laidlaw tapped over the three points.
Gopperth's 51st-minute penalty was all the home side had to show for a concerted spell of pressure, but the second try eventually came at the end of the third quarter.
Gopperth's inviting pass sent Dave Kearney darting past two covering defenders to score just to the right of the posts, with the conversion quickly added for 15-6.
There was no sense of Edinburgh surrendering though and a smart break from talisman Laidlaw released Visser for a well-worked try in response. The scrum-half's conversion made it a two-point game again.
But off-colour Leinster held firm to secure home advantage in the semi-finals, where they will face provincial rivals Ulster.
Leinster: R Kearney, McFadden, O'Driscoll, D'Arcy, D Kearney, Gopperth, Boss, J McGrath, Strauss, Ross, Cullen, McCarthy, O'Brien, Murphy, J Heaslip.
Replacements: Macken for R. Kearney (63), Madigan for D'Arcy (67), L. McGrath for Boss (79), Healy for J McGrath (54), Cronin for Strauss (13), Moore for Ross (54), Ruddock for Cullen (55), Ryan for O'Brien (56).
Edinburgh: Bezuidenhout, Beard, Scott, Strauss, T Visser, Leonard, Laidlaw, Dickinson, Ford, Nel, Gilchrist, B. Toolis, Coman, Leonardi, Denton.
Replacements: Francis for Bezuidenhout (71),
Hart for Beard (3), Atiga for Scott (29),
A Toolis for B Toolis (59), Basilaia for Denton (27).