Paddy Jackson fired over a late penalty in Belfast to make it five wins out of five for Pro12 leaders Ulster.
Ospreys controlled the opening 20 minutes and Nicky Smith rumbled over for a converted try.
Ulster gained a foothold in the game with Jackson’s penalty leaving the visitors 7-3 ahead at the break.
Jackson added a penalty but Ulster failed to capitalise on their dominance and an excellent Ospreys defence held out until Jackson’s winning kick.
The Welsh visitors were aiming to bounce back from last week’s defeat by Leinster and they made the early thrusts at a sun-kissed Kingspan Stadium.
They were rewarded when Smith went over from close range on six minutes and Dan Biggar slotted over the extras.
Ospreys pressed for a second try before the momentum switched to Ulster midway through the first half.
Jackson drifted a penalty wide and Darren Cave fumbled as he charged towards the line.
The gap was narrowed by Jackson but he missed another penalty early in the second half before making it two from four after 50 minutes.
Ulster were boosted by the introduction of classy scrum-half Ruan Pienaar and Ireland wing Tommy Bowe, who was making his first appearance since April following a knee injury.
Ospreys soaked up Ulster pressure with resolute defending and they almost scored a try on the counter-attack on 66 minutes.
Eli Walker raced on to a clever Rhys Webb kick but the wing was denied by Jared Payne’s last-ditch tackle.
Ospreys continued to threaten on this rare visit to the Ulster 22, which ended when Biggar dragged a drop-goal attempt wide.
Ulster made a final surge and Jackson made no mistake from a penalty in front of the posts with two minutes left.
Ulster: C Piutau, C Gilroy, J Payne, D Cave, L Ludik, P Jackson, P Marshall; : K McCall, R Best, R Ah You, A O’Connor, F van der Merwe (capt), I Henderson, S Reidy, R Wilson.
Replacements: J Andrew, C Black, R Kane, K Treadwell, R Diack, R Pienaar, B Herron, T Bowe.
Ospreys: D Evans, J Hassler, B John, J Matavesi, E Walker, D Biggar, R Webb; N Smith, S Parry, D Arhip, B Davies, A Wyn Jones (capt), J King, J Tipuric, D Baker.
Replacements: S Baldwin, P James, M Fia, R Thornton, O Cracknell, T Ardron, T Habberfield.
Referee: Ben Whitehouse (WRU)
Article source: http://www.bbc.co.uk/sport/rugby-union/37486576