The 26-year-old, who made his British and Irish Lions debut in the second Test against Australia in June, suffered his injury setback during Saturday's RaboDirect PRO12 match against Ulster.
Leinster won the contest, but O'Brien was forced off after 53 minutes.
Leinster will face Connacht on Saturday but O'Brien will miss that match, and the club gave a fitness bulletin that forecast he would be sidelined for a lengthy stretch.
The club announced on their website: "Sean is to have surgery this week to repair a dislocated shoulder, which will unfortunately keep him on the sidelines for several months."
Leinster forwards coach Jono Gibbes said, according to the Irish Rugby Football Union's website: "The time frame to return to play hasn't been set in stone but it is significant enough for surgical intervention which means six to eight weeks minimum.
"It looks like that (he will miss the entire Six Nations), but they are not going to put an absolute line in the sand for him. They are just going to see how it goes."
Ireland begin their Six Nations campaign against Scotland at the Aviva Stadium on Sunday, February 2.