Fourteen of the Sharks' points were earned from two converted tries in the last seven minutes.
The Ospreys, forced into late changes because of illness to Wales scrumhalf Rhys Webb and initial replacement scrumhalf Reuben Morgan-Williams, were under pressure for most of the first half.
Although the Cell C Sharks showed attacking intent throughout the first half, too many unforced errors cost them momentum and points. They led 6-0 at the break after two penalty goals by flyhalf Curwin Bosch in the first 20 minutes in a match that battled to flow.
Four of the Springboks who played against England last weekend, Bongi Mbonambi (hooker), Ox Nche (prop), Jaden Hendrikse (scrumhalf) and Makazole Mapimpi (wing) started for the Durbanites and made good contributions.
The second half started in a frenzy with Ospreys running the ball virtually the length of the field. Flyhalf Jack Walsh’s pin-point kick from a loose scrum on the hosts’ line was caught by right wing Luke Morgan and he dotted down unhindered.
The home side reciprocated shortly after, and it was flank Sikhumbuzo Notshe who went over for a try to stretch the Cell C Sharks' lead back six points.
With 14 minutes left for play Ospreys No 8 Morgan Morris scored out wide from strong forward play, but Walsh missed the conversion.
With only one point separating the sides, the Cell C Sharks suddenly showed more urgency, with Bosch getting a converted try. A maul on the Ospreys line helped the home side sneak through for their third try by replacement loose forward James Venter for a hard earned 25-10 victory.
Cell C Sharks 25 (6) – Tries: Sikhumbuzo Notshe, Curwin Bosch, James Venter. Conversions: Bosch (2). Penalty goals: Bosch (2).
Ospreys 10 (0) – Tries: Luke Morgan, Morgan Morris.