Tries by Greig Laidlaw, Tim Visser and Chris Paterson, who also kicked 12 points, did the business for the home side.
The Dragons, whose play-off hopes are over, had tries from the in-form Aled Brew and Adam Hughes and five points from the boot of Jason Tovey.
The hosts made the perfect start and from the kick-off earned a penalty which experienced full-back Paterson stroked over.
Edinburgh dominated the next 29 minutes but failed to add to their points tally. The closest they came was when Visser, the league's top try scorer this season, broke from halfway. He swatted off one tackler and then chipped ahead, only to be beaten by Jonathan Evans in the race for the line.
But although the Scots ran the ball at every opportunity and played some attractive running rugby, they failed to penetrate a Dragons defence that coped well with the relentless pressure.
There was a feeling that Edinburgh would pay the price for their profligacy in sight of the line and so it proved when Tovey darted through a gap in the home defence and fed Brew who powered over for his fifth try in three league games.
Tovey added the conversion, but the Edinburgh response was immediate. Visser broke from halfway and offloaded to Laidlaw who took on final two defenders, slowed and then accelerated away for a well-taken try.
Paterson converted and then hammered over a long range penalty to give his side a 13-7 advantage at the break.
The opening minutes of the second half followed the same pattern as the first, but this time Edinburgh's pressure yielded points with Paterson sending Visser thundering over for his 14th try of the league campaign.
Paterson tagged on the extras and shortly afterwards, he was the beneficiary when Visser sent the full-back scampering in behind the posts for a 55th minute try which he converted himself.
Dragons fly-half Tovey clawed back three points with a penalty but was off the mark with the conversion attempt after full-back Hughes had dotted down. He scored after racing onto a kick ahead that eluded Visser.
Both teams were reduced to 14 men when Andrew Coombs and Esteban Lozada were despatched to the sin-bin following a punch-up involving a handful of players from either side.
But the absence of the duo made little difference as Edinburgh held on comfortably for just their second win in eight encounters with the men of Gwent.
Giving his reaction afterwards, Edinburgh's interim head coach Nick Scrivener said: "We've had a pretty poor record of late against Dragons, and you could see from the start that we were desperate to rectify that.
"We wanted to make a really fast, positive opening to the match, something that would set the tone, and the boys certainly delivered on that front.
"I'm delighted we've been able to give the fans a couple of good wins to finish off with at Murrayfield because it's been an up and down year on the field and they deserve huge praise for sticking by us.
"Now it's about taking this good form into the Treviso match and winning away from home, something that's not been easy for us over the season."
Edinburgh could still finish seventh in the table. The Dragons are now just a point ahead of the Scottish side ahead of their final games against the Cardiff Blues and Ulster.
|Edinburgh Rugby Score Card|
|Newport Gwent Dragons Score Card|