Edinburgh (10) 32
Tries: Cross, Visser, Robertson, Blair. Cons: Paterson 2, Blair Pens: Paterson, Blair
Leinster (12) 24
Tries: Heaslip, Kearney. Cons: Nacewa Pens: Nacewa 3, Kearney
Edinburgh's Tim Visser scored a try early in the second half
Edinburgh rediscovered their winning ways with an improved performance against Leinster at Murrayfield.
The Irish moved ahead early in the match and led 12-10 at half-time from Isa Nacewa and Rob Kearney penalties.
Brothers Mike and David Blair were key figures in the second half, the latter's try adding to those by Geoff Cross, Tim Visser and Mark Robertson.
Leinster scored two tries of their own, from Jamie Heaslip and Kearney, but the home side held firm to take the points.
David Blair was named Magners League man of the match for his energetic and intelligent performance.
He had stepped in to Rob Moffat's Edinburgh side after stand-off Phil Godman injured his knee in training during the week and was ruled out for six months.
Scotland international Chris Paterson broke the 700-points barrier in the Magners League with his contribution - a penalty and two conversions.
He also produced a magnificent burst of pace early in the second half, running 50m before being halted by Kearney.
From that, Edinburgh moved the ball out to the right wing and Mark Robertson sprinted over the line. The score at that point was 20-12.
The kick through the posts was one of Paterson's two conversions and was cheered loudly, the home crowd offering encouragement to the full-back who had, uncharacteristically, missed straightforward penalties on either side of the half-time interval.
Unfortunately, Paterson was forced off by an injury to his left foot with a little under 25 minutes remaining and was replaced by Tom Brown.
Rob Kearney made his 100th appearance for the Dublin club
Leinster's poor start to the season has been similar to Edinburgh's but they had, at least, registered a win prior to kick-off, a valuable home triumph against Blues.
Number 10 Nacewa scored two early penalties to move the visitors ahead after Paterson's third-minute penalty had opened the scoring.
And a 55m penalty by Kearney, making his 100th appearance for the club, stretched their lead to 9-3.
Edinburgh began to get a grip on the first half but struggled to make their dominance show on the scoreboard.
This was exemplified when Paterson kicked a penalty into touch and from the line-out Edinburgh moved the game into the middle of the pitch. Ross Ford slipped a pass to Scott MacLeod who got to within a yard of the try line before being halted.
The Scots' first try came from an unexpected source, when Geoff Cross collected a slick pass from Mike Blair and made a five-yard burst to go over under the posts. Paterson's simple conversion made it 10-9, putting the hosts ahead once more.
Yet Leinster got their noses in front again when Ford was penalised and New Zealander Nacewa shelled a 48m kick through the posts.
Before the break Dutch-born Visser was stopped in his tracks on the left two yards from the corner flag when he was tackled brilliantly by the experienced Shane Horgan.
After the restart Visser did manage to get over the line, the winger the beneficiary of swift play from right to left by Mike and David Blair.
Robertson's try and Paterson's conversion put a bit of daylight between the teams as suddenly confidence spread through the Edinburgh side following three straight defeats.
David Blair muscled his way over for a try to make it 27-12 after a quick penalty by his brother allowed the pair to punish slack Irish defending.
The try-scorer then kicked the difficult conversion through the posts and he followed that up with a penalty to give Edinburgh a 20-point advantage.
Yet Leinster were not willing to lie down. British and Irish Lion Heaslip forced his way through the centre of the Edinburgh defence and Nacewa completed the conversion to reduce the deficit.
The visitors enjoyed most of the pressure in the closing minutes and had the Scots pinned back. They breached the black and red line once more, in the last minute, when Kearney finished off a swift switch of play to the left wing to register a try.
Edinburgh: Paterson, Robertson, Cairns, Grove, Visser, D Blair, M Blair, Jacobsen, Ford, G. Cross, Lozada, MacLeod, Newlands, Rennie, Grant.
Replacements: Brown for Paterson (57), Houston for Grove (44), Laidlaw for M. Blair (68), Traynor for Jacobsen (66), Kelly for Ford (64), Gilding for G. Cross (72), Hamilton for MacLeod (64).
Not Used: MacDonald.
Leinster: R Kearney, Horgan, O'Driscoll, D'Arcy, Fitzgerald, Nacewa, Reddan, van der Merwe, Strauss, Ross, O'Donoghue, Toner, D Ryan, Jennings, Keogh.
Replacements: Madigan for Nacewa (71), Boss for Reddan (64), Healy for van der Merwe (50), Harris-Wright for Strauss (67), Galarza for O'Donoghue (34), Heaslip for Keogh (50).
Not Used: Shawe, O'Malley.
Referee: Tim Hayes (WRFU).