The British and Irish Lions flanker's try capped an excellent personal display, with fly-half Jimmy Gopperth booting the rest of Leinster's points with four penalties.
The Ospreys responded with three penalties from Wales fly-half Dan Biggar, but the hosts lacked the accuracy in attack and edge at the breakdown to overcome a side who have won European silverware in each of the last three seasons.
The Irish province were without the talismanic presence of Brian O'Driscoll but they were still able to secure what may prove a vital away win in Pool 1, which also includes French champions Castres and Aviva Premiership runners-up Northampton.
The Ospreys will head to Franklin's Gardens next weekend knowing defeat will leave them facing an almighty task if they are to reverse the recent trend of Welsh sides failing to reach the knockout stages.
It had all started so promisingly for the hosts as a fast start gave them a 6-3 lead courtesy of two Biggar penalties, with Gopperth knocking over one of his own for the visitors.
But their performance unravelled when they spurned a great opportunity 25 minutes in.
After indecision from scrum-half Tito Tebaldi the ball made its way to Richard Hibbard on the right flank and with two men outside him, the hooker attempted to barge over but was held up short.
The Ospreys were still awarded a penalty and opted for a scrum having had the better of the set-piece battle, and with Leinster's Ireland tighthead Mike Ross off the field due to a apparent hamstring problem.
But Leinster wheeled and drove their opponents back to win a vital penalty, and they were soon ahead.
Jamie Heaslip stripped Andrew Bishop of the ball in midfield and set off up field. Rob Kearney took the attack on before Sean Cronin did what opposite number Hibbard could not and found a pass to allow O'Brien to barrel over, with Gopperth converting.
The former Newcastle man cemented the Irish side's lead with a long-range penalty and the visitors led 13-6 at the break.
Biggar trimmed the lead shortly after the resumption, but scrum-half Tebaldi quickly allowed Gopperth to cancel out the three points after his ill-advised tap-and-go from a penalty saw the ball go loose and the Ospreys ended up under all manner of pressure in their own 22.
Leinster were firmly on top at the breakdown and the pressure they exerted in that area led their Welsh hosts to make costly mistakes.
Knock-ons from Alun Wyn Jones and Biggar wasted attacking situations, and even when Justin Tipuric put replacement Jeff Hassler free down the right, Gopperth proved up to the task of dumping the winger into touch.
The fly-half even denied the Ospreys a losing bonus point as he slotted his fourth penalty late on.
- Sports & Recreation
- Jimmy Gopperth
- Dan Biggar