Eoin McKeon scored the only Connacht try with Steve Crosbie, on his second start for the province, kicking six from six in a very composed display from out-half.
Connacht led 22-0 with 63 minutes on the clock but a penalty try, with Tiernan O’Halloran sin-binned as a result, and a score under the posts from Hamish Watson made it 22-14 by the 68th minute.
That ensured an uncomfortable finish for Connacht and a Glenn Bryce try in the left corner on 74 minutes had the nerves jangling but O’Halloran soon returned and the visitors held on.
A clinical first-half display ended with Connacht 17-0 in front as Crosbie kicked his first long-range penalty on nine minutes after Connacht’s first foray into opposition territory.
Edinburgh were enjoying the lion’s share of possession and territory but Connacht were defending well and were soon six points to the good after another excellent long-range kick by Crosbie on 27 minutes.
McKeon struck for Connacht’s first try on the half hour with Kieran Marmion timing his pass perfectly to pop McKeon through a gap with the flanker picking a great line and scoring under the posts.
Clinical Connacht struck again before the break as Crosbie slotted another tricky penalty with ease to make it 17-0 at the interval.
Edinburgh had their chances in that first half but Duncan Weir was off target with both of his penalties.
As in the first half, Connacht defended well to repel the early Edinburgh attacks before capitalising at the other end through the boot of Crosbie for a 19-0 lead on 50 minutes.
Tom McCartney soon departed with a leg injury and The Fields of Athenry was soon heard around Myreside with the travelling support in full voice.
John Muldoon was pointing to the posts again on the hour after an Edinburgh high tackle and Crosbie obliged with a simple three-pointer for a 22-0 lead and Connacht looked home and hosed.
Edinburgh were not going to go down without a fight however and when O’Halloran, on his 100th PRO12 appearance, was deemed to have halted an attack with an intentional offside, referee Dan Jones awarded a penalty try and sin-binned O’Halloran.
Weir kicked the 64th minute conversion and when Hamish Watson slipped through a tackle and touched down under the posts four minutes later, the comeback was well and truly on.
Edinburgh, sensing their opportunity, kept swarming forward and were within three points of overturning the one-time 22-point deficit when Glenn Bryce dived over in the left corner on 74 minutes.
O’Halloran returned after Weir’s missed conversion and Connacht weathered the storm to see out the final minutes for the victory.
Book your Early Bird Season Tickets for the 2017/18 season here.
Connacht: Tiernan O’Halloran; Niyi Adeolokun (Josh Rowland, 72), Eoin Griffin, Bundee Aki, Danie Poolman; Steve Crosbie (Jack Carty, 62), Kieran Marmion (Caolin Blade, 61); Denis Buckley (JP Cooney, 67), Tom McCartney (Shane Delahunt, 51), Dominic Robertson-McCoy (Finlay Bealham, 45); Quinn Roux (James Cannon, 63), Andrew Browne; Eoin McKeon, Jake Heenan, John Muldoon (C) (Naulia Dawai, 63).