Two tries from wing Jared Rosser and a dogged performance lifted the Dragons off the foot of Guinness PRO14 Conference B and left frustrated Edinburgh with just a losing bonus point to show for their efforts.
The win, their third of the league campaign so far, surpassed the Dragons' two solitary victories from last season as fly-half Jason Tovey added eight points to Rosser's touchdowns with two penalites and a conversion.
Edinburgh threatened and crossed the home line twice with tries from full-back Dougie Fife and wing Darcy Graham, with replacement Jaco van der Walt booting a conversion.
Tovey kicked an 11th minute penalty but it was stalemate between the two 22 metre lines before Rosser - assisted by full-back Jordan Williams - scored his first try, with Tovey kicking the extras.
Edinburgh tried to hit back before the interval and had the Welsh region in all sorts of trouble on their own line.
Lock James Hodgson dashed to within metres of the Dragons posts before he was hauled down. From there, Edinburgh were awarded a series of penalties which they opted to scrummage rather than kick for the posts.
Time and again, the home defence held firm before centre Chris Dean cut a line through the midfield, set-up by Pyrgos, from 10 metres.
A blistering tackle on the line, though, meant it went to a replay decision on the big screen at Rodney Parade and, with no real conclusion, ref Stuart Barry decided to give the Welsh side the benefit of the doubt.
However, the Scotsmen were not to be denied and, bang on half-time, a great burst through the middle from fly-half Simon Hickey saw him throw a long pass out right for Fife to grab and dive in at the corner for an unconverted touchdown.
It was all Dragons for 15 minutes after the break as the Scotsmen's defence held firm from continuous attacking waves.
But it cracked when a ruck near the posts saw scrum-half Rhodri Williams link with Tovey and Jordan Williams send Rosser over on the right for an unconverted score.
Edinburgh slowly got some territory and possession and got back into the game although it controversial circumstances.
Van der Walt sliced through the defence on the 22 and fed Graham on the burst. He was tackled and rolled on his back by home wing Hallam Amos but, after an age checking it on the big screen, the ref said Graham had just managed to touch down. Van der Walt added the extras and suddenly the contest was back on.
Edinburgh huffed and puffed to get to the home line in the final moves of the game but fluffed their chance and the Dragons had a much-needed victory.