Mourinho to leave Real in summer
The Portuguese's imminent departure, three years before his contract expires, will add fuel to widespread expectations he is poised to return to former club Chelsea.
While Real have yet to name a successor, president Florentino Perez confirmed the club had approached Paris Saint-Germain to ask about the availability of Carlo Ancelotti.
"After the talks with our coach Jose Mourinho we have reached the agreement to end the contractual relationship at the end of this season," Perez told a news conference at Real's Bernabeu stadium after a board meeting on Monday.
"Both the club and the coach agree that it is the right moment to end this relationship," the construction magnate said, adding Mourinho would not receive a payoff.
The club have two La Liga games left to play this season and Mourinho's final match in charge will be at home to Osasuna the weekend after next.
Real's move for Italian Ancelotti, who has told PSG he wants to leave, had been rejected by the French champions but he was not the only candidate, Perez said.
"We have not agreed any pre-contract with any coach. That is a job for the next few days. It is not an issue we will resolve tomorrow," he said.
PSG sporting director Leonardo said on French radio on Monday the situation with Ancelotti, who has another year to run on his contract, had not changed.
"It is important to continue what we have started," Leonardo told RTL. "That's why we will still try to keep Carlo."
Mourinho, 50, joined Real after leading Inter Milan to the Champions League title in 2010. He agreed to extend his contract with the La Liga club to June 2016 in May last year.
Perez had hoped Mourinho, whom he has often referred to as "the best coach in the world", would help the club win the 10th European crown that has eluded them since 2002 and end the dominant run of arch rivals Barcelona.
To help realise his dream, he splashed more than 400 million euros of the club's money on players, including a world record 94 million euros on forward Cristiano Ronaldo.
However, after three seasons Mourinho's haul of major titles is one La Liga and one King's Cup, a hugely disappointing return for the world's richest club by income.
He ended a run of six successive years of last-16 exits in the Champions League but three semi-finals in three years was not enough for the club.
"We believe [under Mourinho] we have made a very significant qualitative leap in sporting and competitive terms and we had not been where we should have been for six years," Perez said.
"The record is positive.
"Last year we were enjoying some spectacular football, beating all the records," he added.
"This year the results are very good if you are common mortals but it is not enough for us."
The last Real coach to be given three terms or more at the helm, current Spain boss Vicente del Bosque between 1999 and 2003, won La Liga titles in 2001 and 2003 and Champions League titles in 2000 and 2002.
This season, which Mourinho last week called "a disaster", Real failed to defend their domestic league crown as Barca eased to a fourth title in five years.
They were eliminated in the semi-finals of the Champions League and lost to city neighbours Atletico Madrid in the King's Cup final.
The combative and outspoken Mourinho has also alienated many traditional Real supporters with his treatment of club captain and goalkeeper Iker Casillas.