A try by Stuart McInally plus three penalties by Piers Francis saw the Scots home against an Ulster side for whom Andrew Trimble bagged a try and Paddy Jackson landed a penalty.
However, it was Jackson's lack of accuracy with the boot that proved to be the difference between the sides as he failed with three simple penalties early in the second half.
The visitors had the better of the opening exchanges and it took a tap tackle by home scrum-half Sean Kennedy on Ulster winger Mike Allen to prevent them breaking through.
Edinburgh's first foray into Ulster territory came after 12 minutes when Lee Jones chased a kick ahead and was on the spot to charge down an attempted clearance by Jackson - but was unable to control the ball as it ricocheted clear.
However, the hosts took heart from that effort and their next attack yielded a penalty which Francis stroked between the sticks to open the scoring.
And the home side again resorted to the boot of Francis to extend their lead, the stand-off landing a straightforward kick from inside the Ulster 22 with 30 minutes on the clock.
The hosts were left to rue their failure to capitalise on their pressure when Jackson trimmed the deficit to three points at the break when he was on target with a 40-metre penalty, after Willem Nel was deemed guilty of holding on.
Ulster made a livelier start to the second period and had a chance to draw level in 44 minutes when the home side offended on the edge of their 22. However, Jackson pulled his attempt at goal wide of the target - and his misery continued three minutes later when his next effort suffered the same fate.
The momentum had swung in favour of the Irish side and there was little respite for the hosts, although Jackson's nightmare continued when he tugged a third successive penalty effort left of the target, this time from even closer range.
Edinburgh took full advantage of their good fortune to move further ahead in 56 minutes. Netani Talei made a powerful run for the line and when he was halted just short, Sean Cox acted as the link man, flipping the ball to McInally who plunged over for the first try of the match.
Ulster responded in kind when a bristling run by Jared Payne took play into the Edinburgh 22 and he chipped ahead for Trimble, who touched down in the corner.
Edinburgh had an opportunity to grab a second score with less than 10 minutes to play, only for Francis to spill the ball as he stretched over the line.
However, five minutes later, the same player clipped over a close range penalty to clinch the victory.
Scarlets continued their bid for a semi-final spot with a 24-10 victory over winless Zebre at the Stadio XXV Aprile in Parma.
Liam Williams, one of three Wales internationals back in the Scarlets starting line-up following their RBS 6 Nations success, and Joe Snyman both scored tries, while fly-half Owen Williams contributed the remaining 14 points from four penalties and a conversion.
Zebre matched Scarlets with two tries of their own through Dries van Schalkwyk and Giovanbattista Venditti but they could not add to those scores as they remained rooted to the foot of the standings following an 18th successive defeat.
The win was Scarlets' 12th of the campaign, but it was not enough to keep them in fourth place as rivals Ospreys edged above them after claiming a seven-try triumph over Newport Gwent Dragons in the later kick-off.
Ospreys moved into the top four as their returning Wales stars inspired them to an emphatic seven-try 52-19 victory over the Newport Gwent Dragons.
Tries from Kahn Fotuali'i, Tom Habberfield, Ashley Beck, Tom Isaacs, Dan Biggar, Dmitri Arhip and Justin Tipuric ensured a five-point haul for the hosts, which sees them leapfrog local rivals the Scarlets. Fly-half Biggar booted 13 points with replacement Matthew Morgan slotting the final two conversions.
Dan Evans and Toby Faletau went over for the visitors, while Steffan Jones slotted three penalties as the Dragons slumped to a record defeat in this fixture.
Ospreys fielded all six of the players who had helped Wales resoundingly thump England last weekend, and Richard Hibbard, Adam Jones, Alun Wyn Jones, Ian Evans, Biggar and the superb Tipuric enjoyed a comfortable return to regional action.
But the most telling return of the night could yet prove to be that of Dan Lydiate. The Wales flanker made his first appearance in six months for the visitors after breaking an ankle.
The tough-tackling back-rower has limited time to try and force his way into Lions contention, but made some typical juddering challenges before being replaced as planned at half-time.
- Sports & Recreation