O'Brien faces up to six months on the sidelines and won't be back in time for the tournament in Japan, which starts on September 20.
Injury denied O'Brien a place in Leinster's squad for Saturday's 18-15 PRO14 final victory over Glasgow Warriors at Celtic Park but he still lifted the trophy with his team-mates following the win.
A statement issued on Leinster's website read: "Unfortunately (head coach Leo) Cullen has confirmed that back row Sean O'Brien will undergo surgery in the next few weeks for a hip injury.
"As a result will be ruled out of action for up to six months. He has been ruled out of the Rugby World Cup in Japan."
O'Brien, who has 56 Ireland caps, will swap Leinster for English club London Irish later this year.
The 32-year-old has struggled with a string of injuries across an otherwise impressive trophy-laden career for his province, Ireland as well as the British and Irish Lions.