It was a gripping game from start to end, but the visitors' determination, despite a later yellow card, saw them through for the vital victory.
The first half was thrilling with the Cell C Sharks scoring two converted tries for a 14-0 lead before Edinburgh fought back strongly with three back-to-back tries to take a 19-14 lead.
The second half provided more of the same excitement, and while the Durbanites added a third try, it was a penalty goal by Cell C Sharks flyhalf Curwin Bosch that proved to be the difference on the scoreboard in the end.
Cell C Sharks scrumhalf Grant Williams struck first with a brilliant intercept try in the fifth minute, using his raw pace to score, and their chances of extending their lead were improved as Edinburgh wing Wes Goosen received a yellow card for an infringement at a ruck on the tryline.
The Durbanites capitalised on this with wing Marnus Potgieter scoring out wide thanks to an overlap in the 19th minute after some good forward play for a 14-0 lead.
But the hosts fought back with intent as hooker Adam McBurney rounded off a stunning team try before adding his second soon after from a powerful rolling maul, and the successful conversion allowed them to level the scores at 14-14 with less than three minutes left in the half.
Edinburgh continued to fight and this paid off with their third try by fullback Henry Immelman - who will be joining the Vodacom Bulls next season - a minute later from great speed and support play on attack, which saw them take a handy 19-14 lead going into the break.
The Cell C Sharks earned the first points after the restart with Bosch slotting a penalty goal to push them within two points of the hosts on the scoreboard. They showed enterprise on attack, but they were shut out by effective defence by the home side.
The visitors forced their way to the tryline through a rolling maul in the 61st minute with hooker Kerron van Vuuren earning the five-pointer, which saw them take a 22-19 lead at a crucial time of the match. They came within inches of adding another minutes later as Springbok prop Ntuthuko Mchunu broke through and tried to stretch over the tryline, but the ball was ruled to be held up.
The Cell C Sharks were placed under pressure with 13 minutes left on the clock as replacement prop Carlu Sadie received a yellow card for an infringement at a ruck, reducing them to 14 men for the next 10 minutes, but their tenacious defence saw them hang on for the 22-19 victory.
Edinburgh 19 (19) – Tries: Adam McBurney (2), Henry Immelman. Conversions: Charlie Savala (2).
Cell C Sharks 22 (14) – Tries: Grant Williams, Marnus Potgieter, Kerron van Vuuren. Conversions: Curwin Bosch (2). Penalty goal: Bosch.