O'Brien played under Sam Allardyce at Bolton and was brought to Upton Park by the Hammers boss in 2011.
The club announced on their Twitter feed: "West Ham United are pleased to announce that Joey O'Brien has signed a new contract with the club until summer 2016."Versatile O'Brien, who has five caps for the Republic of Ireland, has played 16 times in the Barclays Premier League this season, scoring twice.
The 26-year-old helped the Hammers win promotion from the npower Championship last term.
O'Brien made 70 appearances in all competitions over seven years at Bolton, including playing in the Europa League.
He also had two separate loan spells at Sheffield Wednesday and he was hampered by a serious knee injury in the seasons before his departure to the Hammers.