Six penalties from Dan Biggar were the backbone of the victory which was made all the more impressive with a penalty try and a try from Richard Fussell in the second half.
Ulster had made the early running catching Ospreys cold with a try after only three minutes.
A long pass from scrum-half Paul Marshall sent Paddy Jackson over after he ran between Biggar and Andrew Bishop. Jackson, in at outside-half for the injured Ian Humphreys, converted to give Ulster a 7-0 lead.
The Ospreys had a chance to get on the scoreboard almost immediately but Biggar's penalty kick, awarded for not releasing at a ruck, rebounded off a post and Ulster were able to clear.
Jackson was also off target with his first penalty shot from the halfway line after the Ospreys scrum was penalised by Irish referee Dudley Phillips.
But on 11 minutes the Ulster scrum was penalised for standing up after a strong push from the Ospreys pack. From 35 metres Biggar kicked his side onto the scoreboard.
The Ospreys were penalised at a scrum resulting in hooker Richard Hibbard being sin-binned.
But, despite being down to 14 men, Ospreys responded with two Biggar penalties on 26 and 31 minutes to give them a 9-7 lead.
Ulster continued to concede penalties as Biggar struck a fourth kick to take the Ospreys into a 12-7 lead on 34 minutes.
Ulster had a golden opportunity to claim a second try when Jackson found wing Craig Gilroy with a neat cross-kick but supporting lock Dan Tuohy knocked forward.
The Ospreys came out after the break with a positive intent and threatened to score their first try. But, after going through the phases, Biggar attempted a drop-goal which went wide of the mark.
Biggar made up for his miss with a fifth penalty goal on 48 minutes after Ulster No8 Robbie Diack was sin-binned for not rolling away from a tackle right in front of his posts.
The Ospreys were putting some rugby together which was very pleasing on the eye but a try remained elusive as Tom James put a foot in touch.
After a series of scrums on the Ulster five-metre line the Ospreys were eventually awarded a penalty try to take them into a 22-7 lead on the hour mark.
That lead was extended to 18 points when Biggar put over his sixth penalty after Ulster erred offside just outside their 22.
A mix-up in Ulster's defence allowed Richard Fussell to pounce for the Ospreys' second try on 72 minutes.
Three minutes from time the referee awarded Ulster a penalty try after the Ospreys were penalised for hands in a ruck on the line.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.