The 50 year-old Moyes is leaving Everton to replace Ferguson, who announced yesterday that he is retiring after nearly 27 years at Old Trafford.
United said Moyes was given a six-year deal and will take charge of the newly crowned Premier League champions from 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.
Moyes is replacing the most successful manager in British football history, with Ferguson producing 13 of United's 20 English titles and a string of other titles, including three European Cups.
More From This Section
Moyes' arrival should help to ensure a smooth transition between Glaswegian managers as 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.