However the win was overshadowed by the sight of Ferris hobbling off in the second half in what was his first game in a month, a worrying sight for Ireland coach Declan Kidney with the autumn internationals looming large.
Edinburgh began well and late Ulster tries added gloss to the scoreline, Tom Brown scoring two tries for the visitors and Gregor Hunter kicking ten points.
Ulster went into the game unbeaten in eight matches across all competitions, while Edinburgh were hoping to end a run of six consecutive defeats with Ulster losing 12 men to the international break.
Edinburgh began well, applying early pressure, Lee Jones making a darting run through the home defence although he was held up well.
But the pressure told in the 11th minute, Edinburgh playing the ball down the left, where 22-year-old Brown touched down for an early lead, Hunter adding the extras.
Ulster pegged the visitors back immediately though, Niall O'Connor - an early blood replacement for Pienaar - kicking a penalty with Edinburgh penalised for not staying on their feet.
James King was unlucky not to find a way through following his surging run for the visitors, but Ulster were penalised for offside and Hunter extended the visitors' lead.
In a pulsating first half, Wilson stole a lineout and launched an attack, which eventually saw Payne's kicked through-ball well intercepted by Jones.
Ulster were awarded a penalty try in the 29th minute after a powerful scrum though, Pienaar kicking the conversion to level the scores.
And the hosts scored again immediately from the restart, Paul Marshall catching the ball before laying off to Pienaar who played in Gilroy, who in turn laid off for Payne's try, Pienaar kicking the conversion.
Pienaar continued to show his worth, blocking Hunter's clearance before running clear to score, adding the extras as the hosts established a foothold.
But in a see-sawing encounter Edinburgh responded perfectly after a mad five minutes, Hunter with an inside pass to Brown who touched down, Hunter kicking the extras to make it 24-17 at the break.
Just two minutes after the restart Hunter kicked Edinburgh to within four points of Ulster after the hosts were penalised for not releasing the ball.
Ulster's scrum game began to dominate in the second half but the Edinburgh defence held firm as Marshall and Pienaar increasingly controlled play.
And from a quick restart Marshall ran at the Edinburgh defence, and although he was tackled, the ball was recycled to Wilson who touched down for Ulster's bonus point try, Pienaar adding the extras.
After 68 minutes Ulser took advantage of a scrum deep in Edinburgh's half, O'Connor offloading to Payne who went over, Pienaar again converting.
And in the final minute Gilroy touched down, Pienaar's conversion striking the post on its way through as Ulster cantered to a victory which sees them remain top of the PRO12 table.
|Ulster Rugby Score Card|
|Edinburgh Rugby Score Card|