Real president Florentino Perez announced the news during a press conference at the Bernabeu Stadium, and also revealed the La Liga club will not seek compensation from Mourinho's next move.
The Portuguese coach is now expected to walk into the welcoming arms of Chelsea supporters with a return to Stamford Bridge.
Mourinho has been involved in a number of controversies during his three-year reign in Spain, notably poking then Barcelona assistant manager Tito Vilanova in the eye during a Supercopa tie at the Camp Nou in 2011 (Youtube) and claiming UEFA favoured the Catalan side after an ill-tempered Champions League semifinal earlier that year, as the Daily Mail reported.
The former Porto coach was handed a two-match suspension for the incident involving Vilanova, but the ban was lifted as part of an amnesty by the Spanish Football Federation, as highlighted by ESPN.
In the wake of the announcement of Mourinho's exit from the Bernabeu Stadium, Barcelona vice-president Carles Vilarrubí told Radio Catalunya via ESPN that the 50-year-old coach had been "a scourge" on the game in Spain.
Now I can speak out, Mourinho has been a scourge. Seeing him leave is positive for Spanish football because he had created a negative atmosphere.
There is no doubt that Mourinho and Barcelona have a chequered history after the outgoing Real boss' celebration at Camp Nou following Inter Milan's Champions League semifinal win in 2010 incensed some home fans, despite the Portuguese previously working at the club under the late Sir Bobby Robson during the 1990s.
Mourinho claimed after that triumph that Barcelona's "hate could not be turned into love," as the Daily Mail noted. He also crossed swords with the La Liga giants during his time with Chelsea.
However, Vilarrubí's comment over the departure of Mourinho do not seem becoming with Barcelona but do underline how he has got under the skin of the Catalan club.
But this certainly wasn't the case on the field where he failed to complete La Decima, a 10th European Cup victory which is uppermost in the minds of Real. Mourinho took the club to three successive semifinals but could not climb the final hurdle.
Mourinho did guide the club to its first Copa Del Rey win in 18 years at the end of his first season with a 1-0 win over Barcelona in the final and broke their grip on the La Liga title in 2012.
But it has still been the name of Barcelona which has dominated the Spanish game during his reign at the Bernabeu over the last three seasons.
The trophy count during that period, the silverware count is 8-3 in favour of Camp Nou, as ESPN noted from the headlines in Spanish sports newspapers.
Mourinho has done himself few favours at Real this season after dropping goalkeeper and captain Iker Casillas and snubbed the King of Spain following the Copa del Rey loss to Atletico Madrid this season, as the Daily Telegraph reported.
Mourinho's time at Real cannot be deemed a failure, but it was hardly a special time for either club or manager with £127 million spent with comparatively little reward.
But Vilarrubí's comment as Mourinho prepares to make his exit from the Spanish game was not required.
The rivalry between the two La Liga giants, rightly, remains as fierce as ever, but Barcelona are bigger than to stick a boot in as Mourinho exits.
Chelsea may be about to benefit as their incoming manager steels himself to prove his worth again. Who would bet against the Blues and Barca being paired in the Champions League next season?
More pertinently, who would back against Mourinho making his point in response?