Casillas lost his place to Diego Lopez when he broke a bone in his left hand during Jose Mourinho's final year as the club's coach in 2013.
When Ancelotti took over, Casillas failed to win his starting spot back and began to grow more and more irritated with the Italian.
However, he managed to regain his place in the starting XI in the recently-concluded La Liga season and registered 12 clean sheets.
Despite his ill feelings towards Ancelotti, Casillas wished the 55-year-old well after he was axed on Monday following a disappointing season in which Madrid failed to win any major silverware.
"It is a demanding club and the president and the board have made the best decision," Casillas told Cadena SER. "But I thank Carlo for what he has done for me, even though last year I was angry because he did not play me much.
"He is a noble person and I wish him well. Madrid will always be his home."
There has also been a lot of speculation about whether Casillas will stay at Madrid or move to another club after Los Blancos expressed their interest in signing Manchester United goalkeeper David de Gea.
However, the 34-year-old has is confident that he will remain with the club and added that he hopes to end his career in Madrid.
"I am sure that I will continue here next season," he said. "I can't imagine I will not be at the club next season. I want to finish my career here.
"If things were not working I would have to leave, but now I feel good and I am strong. I will face the coming season as if it were my first here, that's my challenge."