The Hammers faced competition from Leyton Orient chairman Barry Hearn over the rights to the ground, but the Premier League club were named preferred bidders for the stadium by the London Legacy Development Corporation (LLDC) three months ago.
Initially, West Ham owners David Sullivan and David Gold were reluctant to pay anything towards the reconstruction of the stadium, but have agreed to put up £15 million.
|14/1||West Ham are 14/1 to be relegated with Bet365|
The roof will be extended and the seating inside the stadium, which will slide over the running track, will be reduced from 80,000 to 54,000 under conversion plans.
The Premier League club will be required to pay £2m a year in rent and have agreed to hand a proportion of any profits from the club's future sale to LLDC.
"I'm delighted that we have been confirmed today as the anchor concessionaire for the Olympic Stadium," vice-chairman Karen Brady told the club's official website.
"It was important to me that we struck a deal that would stand the test of time that represented the right deal for West Ham United and our loyal and patient supporters."
Joint-chairmen David Sullivan and David Gold praised the club's staff for their hard work, and say that the move will allow the east Londoners to compete at the highest level.
They added: "Today's decision offers us a real platform to [compete at the highest level] and we are fully committed to making it a real success.
"We understand the responsibilities that come with calling the nation's iconic Olympic Stadium, which will be converted into a world-class football stadium, our new home. It is an honour we will take on with pride."