Moyes is leaving Everton to join the 20-time English champions. He has a six-year contract and will take charge of the newly crowned Premier League champs on July 1.
"It's a great honor to be asked to be the next manager of Manchester United," Moyes said in a statement. "I am delighted that Sir Alex saw fit to recommend me for the job. I have great respect for everything he has done and for the football club."
Ferguson announced on Wednesday he is retiring after nearly 27 years at Old Trafford.
"I know how hard it will be to follow the best manager ever, but the opportunity to manage Manchester United isn't something that comes around very often and I'm really looking forward to taking up the post next season."
The 50-year-old Moyes is replacing the most successful manager in British soccer history. Ferguson produced 13 of United's 20 English titles and a string of other titles, including two European Cups.
Moyes' arrival should help ensure a smooth transition, with the managing job passing from one Scotsman to another. The 71-year-old Ferguson remains at United as a director.
"When we discussed the candidates that we felt had the right attributes we unanimously agreed on David Moyes," Ferguson said. "David is a man of great integrity with a strong work ethic. I've admired his work for a long time and approached him as far back as 1998 to discuss the position of assistant manager here."
He joined Everton in 2002 and turned the Merseyside club from a relegation contender into a regular qualifier for European competition. In 2005, he guided the club into the qualifying rounds of the Champions League.
Ferociously ambitious and with a sharp eye for emerging talent, Moyes has kept Everton near the top of the Premier League despite limited money to attract the best players.
"There is no question he has all the qualities we expect of a manager at this club," Ferguson said.
Moyes has shown loyalty and staying power in his 11 years with Everton -- attributes that should suit him well in his next job. United is trying to avoid any radical changes to its structure after Ferguson joins the boardroom when the season ends.
United is owned by the Glazer family, which will be relying on Moyes to maintain the club as a force in global soccer. In particular, it wants to make sure the team can service debts of $572 million, according to the latest financial results.
"His hard-working style and steely determination are characteristics we value at the club," co-chairman Joel Glazer said. "He has impressed as a coach for many years now and we strongly believe he will be able to take up from where Alex is leaving off by continuing this club's tradition of flair football played by exciting, world class players."
As well as his league titles and European Cups, Ferguson has won five FA Cups, four League Cups and the 2008 FIFA Club World Cup.
"I have always said that we wanted the next manager to be a genuine Manchester United man," said former United striker Bobby Charlton, who is now a club director. "In David Moyes, we have someone who understands the things that make this such a special club.
"We have secured a man who is committed to the long-term and will build teams for the future as well as now. Stability breeds success. David has tremendous strength of character and recognizes the importance of bringing young players through and developing them alongside world class talent. At United, I think David will be able to express himself."