Ross Rennie breaks away from William Green
Edinburgh 20 (6)
Tries: Hogg, Hodge
Cons: Paterson 2
Pens: Paterson 2
Leinster 14 (9)
Pens: Contempi 3
Ally Hogg was the Gunners glory man as he led Edinburgh to a morale-boosting Magners League triumph at Murrayfield.
The breakaway forward snapped up one try and created another for Duncan Hodge in the defeat of the Dubliners.
There was bad news for the hosts when their Test winger Simon Webster was stretchered off in the second half.
Leinster made a late bid to salvage a result with Ronan McCormack squeezing over a minute from time but Edinburgh were able to hold on for the victory.
Edinburgh got off to a shaky start, falling behind straight from the kick-off.
Hogg committed a knock-on while receiving and a team-mate gave away the penalty by playing the loose ball from an offside position.
Argentinian star Felipe Contepomi's effort cleared the crossbar off the inside of the post.
Marcus Di Rollo and Webster set up an equaliser for skipper Chris Paterson only for Contepomi to restore Leinster's advantage.
Edinburgh regained their momentum and Paterson was back on target to square matters once more.
But the visitors struck another blow in the build-up to the interval as Contepomi completed his penalty treble from 30 metres.
The Gunners looked more fluent after the break and were rewarded with a try in the 55th minute.
Scott Murray was halted just a pace short of the line and Hogg atoned for his earlier error by ploughing over for the touchdown, which was safely converted by Paterson.
Hogg then set up the clinching score, powering through a midfield gap before being brought down, only for veteran Hodge to grab the offload before sliding over.
Paterson calmly added the extra points before Leinster prop Ronan McCormack squeezed over a minute from time.
Edinburgh: Hugo Southwell; Chris Paterson (capt), Marcus Di Rollo, Rob Dewey, Simon Webster; Phil Godman, Mike Blair; Allan Jacobsen, Dougie Hall, Craig Smith, Matt Mustchin, Scott Murray, Alasdair Strokosch, Allister Hogg, Ross Rennie.
Replacements: Cairns for Webster (52), Hodge for Godman (60), Laidlaw for Blair (68), Kelly for Hall (76), Dickinson for Smith (40), Pringle for Mustchin (52).
Not Used: Callam.
Leinster: Rob Kearney, Gary Brown, Kieran Lewis, Michael Berne, AN Other, Felipe Contepomi, Ronan McCormack, Harry Vermaas, Will Green, Trevor Hogan, Owen Finegan, Stephen Keogh, Niall Ronan, Jamie Heaslip.
Replacements: Warner for Lewis (18), Jackman for Vermaas (60), Byrnes for Hogan (40).
Not Used: Wickham, O'Brien, Easterby, McCarron.
Ref: Nigel Owen (WRU)