Moyes, whose Sunderland side were relegated from the Premier League last season, has not worked in football since resigning from the Stadium of Light club following their relegation to the Championship last season.
Optimistic about the club's new appointment, joint-chairman David Sullivan said that the club needed someone with knowledge of the Premier League and its players and, therefore, they decided to rope in Moyes as their new manager.
"I would like to welcome David to West Ham United. This is a unique position for David Gold and myself - it is the first time in almost eight years at West Ham United that we have appointed a new manager during the season," goal.com quoted Moyes, as saying.
"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. He is highly regarded and respected within the game, and will bring fresh ideas, organisation and enthusiasm," he added.
The Hammers are currently placed 18th in the Premier League table, with just two wins from 11 games they have played so far.
West Ham will now lock horns with Watford on November 19.(ANI)