O'Brien did not feature for Leinster as they defeat Glasgow Warriors on Saturday to clinch the Pro14 title, although he did lift the trophy in his final match for the club.
The 32-year-old has agreed a deal to join newly promoted London Irish in the Premiership following the World Cup.
But O'Brien will not be involved in the tournament in Japan, Leinster revealed on Sunday, as he requires an operation to fix his hip.
A club statement read: "Unfortunately, [coach Leo] Cullen has confirmed that back row Sean O'Brien will undergo surgery in the next few weeks for a hip injury and, as a result, will be ruled out of action for up to six months.
"As a result, he has been ruled out of the Rugby World Cup in Japan."
— Leinster Rugby (@leinsterrugby) May 26, 2019
It added: "Everyone at Leinster Rugby wishes Sean the very best of luck with his recovery and, of course, with his move to London Irish later in the year."
London Irish director of rugby Declan Kidney said: "We are disappointed for Sean that he is not in a position to compete for a place in the Ireland Rugby World Cup squad.
"We wish him a successful operation and a speedy recovery and look forward to welcoming him to London Irish for the next stage of his career."
Photo Getty Images. Caption: Ireland flanker Sean O'Brien