(AFP/Glyn Kirk)
Ferguson's shock retirement announcement the day before left United looking for a new manager for the first time since the legendary Scot succeeded Ron Atkinson in November 1986, but the Premier League champions moved quickly to appoint Moyes.
The 50-year-old, who has been at Everton since 2002, will take over from Ferguson on July 1.
Ferguson, who has won 38 trophies during a record-breaking 26-year spell at Old Trafford, revealed that he had personally recommended his fellow Glaswegian as his successor.
"When we discussed the candidates that we felt had the right attributes, we unanimously agreed on David Moyes," said Ferguson in a statement.
"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 was a young man then at the start of his career and has since gone on to do a magnificent job at Everton. There is no question he has all the qualities we expect of a manager at this club."
Moyes has only presided over two matches in the Champions League and has failed to win a trophy in his 11-year tenure at Goodison Park, but he is widely admired for having led Everton to six consecutive top-eight finishes in the Premier League despite operating on a shoestring budget.
"It's a great honour to be asked to be the next manager of Manchester United," he said in a statement released by his new employers.
"I am delighted that Sir Alex saw fit to recommend me for the job. I have great respect for everything he has done for the football club.
"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."
United director Bobby Charlton, captain of the club's 1968 European Cup-winning team, hailed Moyes as "a genuine Manchester United man".
"In David Moyes, we have someone who understands the things that make this such a special club," he added.
United defender Rio Ferdinand also backed Moyes to succeed.
"It's great to see the new manager coming in, we've never had a problem with him here at United, he's a very honest man from the players you speak to and he's done a fantastic job at Everton," said Ferdinand.
England manager Roy Hodgson is convinced it will help Moyes that Ferguson will be around to offer advice.
"I'm sure that being available for the new man he will be a Godsend in that respect because there is nothing he doesn't know about football and Manchester United," said Hodgson.
Earlier, Everton confirmed that Moyes would leave the club at the end of the season, after he quickly emerged as the frontrunner to succeed Ferguson.
"The manager met chairman Bill Kenwright early yesterday evening (Wednesday) and confirmed his desire to join Manchester United," read an Everton statement.
"The chairman, on behalf of the club, would like to place on record his thanks to David for the massive contribution he has made to Everton since his arrival in March 2002. He has been an outstanding manager."
Kenwright has confirmed that Moyes will take charge of Everton's two remaining matches of the Premier League season, at home to West Ham United on Sunday and away to Chelsea on May 19.
Moyes thanked his former club, saying: "I have had a terrific job at Everton, with a tremendous chairman and board of directors and a great set of players. Between now and the end of the season, I will do everything in my power to make sure we finish as high as possible in the table."
Moyes will lead United for the first time on their pre-season tour of Thailand, Australia, Japan and Hong Kong in July, with his first official game set to be the Community Shield against the FA Cup winners at Wembley Stadium on August 11.
United co-chairman Avram Glazer, son of American owner Malcolm Glazer, said incoming chief executive Ed Woodward would meet with Moyes as quickly as possible to draw up a blueprint for his time at the club.
"Alex was very clear with his recommendation and we are delighted that David has agreed to accept the job," Glazer said.
"I know he is keen to get started and Ed will be sitting down with him as soon as the season is over to discuss plans for the summer and beyond."
Ferguson, 71, took training with the United squad as usual on Thursday morning, ahead of his final home game against Swansea City on Sunday.
Both he and Moyes have cancelled their scheduled pre-match press conferences on Friday, with Ferguson expected to address United's supporters directly after Sunday's game.
Wigan Athletic manager Roberto Martinez was installed as the early favourite to succeed Moyes at Everton, but the Spaniard said he had received no contact from the club and was only thinking about his side's FA Cup final encounter with Manchester City on Saturday.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional