Louis van Gaal was sacked as Manchester United boss because his side played poor quality football this season.
United scored just 49 league goals and were criticised for the lack of attacking play as they finished fifth in the Premier League table.
Dutchman Van Gaal, 64, said he was "very disappointed" to leave, but added "the foundations are firmly in place" to "achieve even greater success".
Jose Mourinho is expected to be named as his successor this week.
The former Chelsea, Real Madrid and Inter Milan boss is due to hold talks with senior United officials on Tuesday.
BBC Sport reported on Saturday that United's FA Cup win over Crystal Palace would be Van Gaal's last game as boss.
United finished fourth and fifth in the Premier League in his two seasons in charge, missing out on Champions League qualification this term.
In a statement confirming Van Gaal's sacking at 20:30 BST on Monday, executive vice-chairman Ed Woodward praised the Dutchman's "great professionalism and dignity" and thanked him for his "excellent work".
United added a decision on a successor "will be announced soon", with Mourinho, 53, and agent Jorge Mendes expected to be in Manchester for talks with senior club officials on Tuesday.
Assistant manager and club legend Ryan Giggs has been made an offer to stay but it is not yet known what role that is and whether he will accept.
But assistant coaches Max Reckers, Frans Hoek and Albert Stuivenberg have all left the Old Trafford club.
- Phil McNulty: Where it went wrong for Van Gaal
- Listen - Mourinho is damaged goods - Football Daily 5 live podcast
Van Gaal spent more than £250m during his time at Old Trafford, acquiring players including Angel di Maria, Anthony Martial and Memphis Depay.
The former Ajax, Barcelona and Bayern Munich boss also gave debuts to 14 academy graduates during his spell as manager.
They included winger Jesse Lingard, who scored the winner in Saturday's FA Cup final, and striker Marcus Rashford, who has netted eight goals since making his debut in February.
"He leaves us with a legacy of having given several young players the confidence to show their ability on the highest stage," said Woodward.
What now for Van Gaal?
Former Dutch international Ronald de Boer, who played under Van Gaal at Ajax and Barcelona, told BBC Radio 5 live it was time for his countryman to retire.
"He does not have anything to prove to the football world," said De Boer. "He has an unbelievable number of trophies and has respect from a lot of players and managers."
Ian Stirling, chairman of the Manchester United Supporters' Trust, described the style of football under Van Gaal as "the worst I have seen in my time", describing it as a "game of chess".
He said that supporters want "someone in charge who respects what the club is about" but expressed concern that Mourinho "plays a similar style to Van Gaal".
Former Manchester United goalkeeper Peter Schmeichel said Mourinho could "save" United, with former Chelsea winger and BBC pundit Pat Nevin adding: "Nobody but nobody in world football brings in the trophies like Jose Mourinho."
Van Gaal's two years in stats
- Manchester United scored 49 Premier League goals this season - their lowest since the 1989-90 season
- For the second consecutive season, United ended up with a negative goal difference away from home
- They went 11 home games without scoring a first-half goal earlier this season
- They conceded the joint-fewest goals in the league - 35 - along with Tottenham
- The team made 3,222 backwards passes - the most in the league
- They had the highest possession average in the league at 58.47%
- Van Gaal used 33 players over the season - the second highest number after Liverpool (34)
- United topped the clean sheet table alongside Arsenal with 18
What else did Van Gaal say?
Having discussed severance terms earlier on Monday - Van Gaal is believed to earn around £6.4m a year - United confirmed his departure late in the day.
In a statement, Van Gaal said it had been "an honour to manage such a magnificent club" and revealed he had "fulfilled a long-held ambition".
He added: "I am immensely proud to have helped United win the FA Cup for the 12th time in the club's history.
"I have been privileged during my management career to have won 20 trophies but winning the FA Cup, which is steeped in so much history, will always be one of the most special achievements of my career."
- What's on Mourinho's to do list at United
- Listen: Mourinho is a shy person - Pat Nevin
- BBC Radio 5 live In Short: 'Biggest problem at United is the ownership'
Van Gaal added: "I would also like to express my gratitude to the amazing United supporters. They are truly the best fans in the world."
His statement also thanked everyone at the club, from the directors - including former manager Sir Alex Ferguson and club legend Bobby Charlton - through to the catering team and laundry department.
He claimed that "never in my 25 years as a manager have I been so well supported in my role".
United delayed announcing the decision of his departure to allow Van Gaal to leave the country, and he has now gone to the Algarve, Portugal.
So is Mourinho the man?
Sacked by Chelsea last December, just seven months after leading the club to the Premier League title, Mourinho agreed a deal in principle with United before the FA Cup final.
The former Porto, Inter Milan and Real Madrid boss is one of the game's most successful coaches.
He won three league titles in his two spells at Stamford Bridge, as well as guiding Porto and Inter to Champions League victories in 2004 and 2010 respectively. He also led Real to the Spanish title in 2012.
His arrival at United will mean a mouth-watering resumption of his rivalry with former Barcelona manager Pep Guardiola, who takes over at United's arch-rivals Manchester City this summer.
Guardiola was previously linked with the Old Trafford post when Sir Alex Ferguson retired in 2013, but the club appointed David Moyes instead.