O'Brien has featured 24 times in his first season with the Bantams following his release from Barclays Premier League side Birmingham, starting 16 games.
Manager Stuart McCall told the Telegraph & Argus: "James has been to the specialist the last few weeks and he's got to have the op. He took a couple of bangs on the nose and has got a crooked septum.
"He's in a lot of pain with it. He's struggling to sleep at night and his breathing is affected.
"Prior to Christmas we were hoping he could get through until the end of the season because he's going to be out for up to six weeks. He's had various injections and we've tried every angle but none of it has worked."
Source: Team Talk