Tim Visser scored on his return and that, coupled with fly-half Leonard's points from the tee, opened up a 13-3 lead just after the break for the hosts.
But Newport fought back and looked to be on the verge of a share of the spoils after Richie Rees crossed and a late penalty from Kris Burton.
However, Leonard had the last laugh and the Scottish outfit made amends for their opening weekend 34-23 setback against Munster.
Both sides began nervously and gave away cheap penalties, Jason Tovey opened the scoring for Newport but Leonard levelled the scores on five minutes.
Dragons' British & Irish Lion Toby Faletau then replaced injured openside Nick Cudd on ten minutes before Tovey missed a difficult attempt at goal moments later.
Ill discipline was costing both sides, and Newport were next to fall foul when they broke at the scrum before the ball was out but Leonard fell inches short with his penalty.
The visitors were again penalised on 20 minutes, and Leonard made no mistake this time to give Edinburgh a 6-3 lead.
The hosts were dominating in the scrum, highlighted by them forcing the Dragons into conceding another penalty on 25 minutes that Leonard opted to kick to touch.
It amounted to nothing but they kept the pressure up for the remainder of the half - Newport holding firm though to take a 6-3 deficit into the break.
The hosts came out with their tails up, though, and a perfectly-weighted pass by Leonard was taken well by Nick De Luca who got close to crossing but was brought down and the Dragons scrambled clear.
They could only hold off for a matter of seconds though as Visser received a brilliant offload from David Denton and crossed in the corner. Leonard added a tough touchline conversion to make it 13-3.
Newport responded well and Edinburgh needed some desperate defending of their own to scramble clear of their five-metre line.
But on 54 minutes Newport did grab a try through Rees who sneaked around the ruck to score, with Tovey's conversion bringing the score to 13-10.
Burton then silenced the Murrayfield crowd with a penalty four minutes from time but some brilliant scrummaging forced the Dragons into conceding a late penalty and Leonard made them pay.
|Edinburgh Rugby Score Card|
|Newport Gwent Dragons Score Card|