Ancelotti, 55, ultimately paid for failing to build on the best run of results in the club's history, in late 2014, with no major trophy at the end of the season.
"During these two years, Carlo Ancelotti has earned the affection of the board and of myself personally, as well as all the fans," Perez told a news conference.
"But Real Madrid is extremely demanding and we believe it is time to give a new impulse that will allow us to win new titles and reach our maximum level."
Madrid had won the Club World Cup on a streak of 22 consecutive victories between September and December to add to the Copa del Rey and UEFA Super Cup in a record four-trophy haul in 2014.
More From This Section
At that point the Madrid press talked of a new contract for the Italian with the club keen for him to become their Sir Alex Ferguson, the legendary Scottish coach who spent 26 years in charge of Manchester United before retiring in 2013.
Ancelotti perfectly fitted the profile needed by Madrid after Mourinho's three-year scorched earth policy left the club divided in the stands and the dressing room.
Billed as the "peacemaker", Ancelotti united the dressing room and avoided the constant confrontation and controversy Mourinho sought.
Former AC Milan star Paolo Maldini once described Ancelotti as as "teddy bear" who never loses his temper. Even in his final days as Ancelotti's fate seemed sealed, with media leaks linking Napoli's Spanish boss Rafael Benitez to his job, Ancelotti maintained his dignity and insisted he wanted to stay on.