"We believe David is the right man to turn things around and get the best out of the players at the club," joint chairman David Sullivan said.
The Hammers sacked manager Slaven Bilic on Monday after a poor run of results that have left the east London side languishing in the relegation zone.
Saturday's chastening 4-1 loss at home to Liverpool convinced Sullivan and co-owner David Gold that Bilic's time was up, with the pair banking on the 54-year-old Moyes's understanding of the English game to keep the club in the top flight.
"We need somebody with experience, knowledge of the Premier League and the players in it, and we believe David is the right man to turn things around and get the best out of the players at the club," said Sullivan.
"He is highly regarded and respected within the game, and will bring fresh ideas, organisation and enthusiasm."
Moyes has been out of management since he resigned from his post Sunderland at the end of last season, having failed to prevent the northeast club being relegated from the Premier League.
Despite that, and an underwhelming stint in Spain with Real Sociedad, the Hammers are backing the Scot to help shore up a leaky defence as well as getting the best out of big-money summer signings Marko Arnautovic and Javier Hernandez.
After Moyes emerged as the leading contender to replace Bilic, many West Ham fans regarded his proposed arrival at the London Stadium with scepticism.
But Moyes, whose first game in charge will be at Watford a week on Sunday following the international break, urged them to get behind him and his squad.
"I'm really looking forward to meeting the supporters and being in the stadium with them," Moyes said in comments published on West Ham's Twitter feed.
"I'm looking forward to seeing them get right behind the team, and my team also. We need the support, we need everybody with us."
He added: "It's a big job we have in hand now but I'm sure with everybody together we can get the right results between now and the end of the season."
Former West Ham defender Bilic is the fourth Premier League managerial casualty of the season, the Croatian's exit following those of Frank de Boer (Crystal Palace), Craig Shakespeare (Leicester) and Ronald Koeman (Everton).