“Jose is quite simply the best manager in the game today,” United executive vice-chairman Ed Woodward said in a statement.
“He has won trophies and inspired players in countries across Europe and, of course, he knows the Premier League very well having won three titles here.
“His track record of success is ideal to take the club forward.”
Mourinho was widely expected to succeed Van Gaal and his agent Jorge Mendes met United officials on Tuesday to discuss personal terms.
The talks became protracted, however, when it emerged Chelsea still owned his name as a trademark.
Now the stage is set for the marriage of two of world soccer’s biggest names, Mourinho and United, England’s most successful club and a global giant.
“To become Manchester United manager is a special honour in the game,” Mourinho said in an earlier statement.
“It is a club known and admired throughout the world. There is a mystique and a romance about it which no other club can match.”
In two spells at Chelsea he won the Premier League three times, including their first for 50 years, and the FA Cup and League Cup.
Mourinho also won league championships in his first seasons at Porto and Inter before helping Real to their first La Liga crown in four years.
United’s fifth-place finish under Van Gaal this season meant they failed to qualify for the Champions League for the second time since Ferguson left. They will play in the Europa League next term.
There are reservations about Mourinho’s preferred style of play with former United striker Eric Cantona saying the club should have opted instead for Pep Guardiola who is taking over at Manchester City.
But other former players, including goalkeeper Peter Schmeichel and former captain Steve Bruce, believe he will revive the fortunes of the Old Trafford team.
Support InfoStride News' Credible Journalism: Only credible journalism can guarantee a fair, accountable and transparent society, including democracy and government. It involves a lot of efforts and money. We need your support. Click here to Donate