Real won the first leg of their quarter-final clash thanks to a goal from Karim Benzema, but it was Casillas who drew the praise from his manager.
The veteran shot-stopper broke his own record for time spent in goal without conceding but needed to produce a fine save from Jhon Cordoba to reach 592 minutes unbeaten.
"I want to congratulate Iker on his record. He's doing well, he deserves this record because of his professionalism," Ancelotti said.
"He's helping the team a lot. He made a good save today from Jhon Cordoba.
"In the end, he's always performed well this season."
Ancelotti was left to rue a number of wasted chances by his side, but was pleased to come away with the win.
"When it comes to a cup quarter-final you always have to put the best team on the pitch. The tie's still open," he said.
"Espanyol played better in the second half, so the tie's still open, so we'll play our best team in the second leg.
"I think we did struggle in the last 20 minutes, but we were better throughout the first hour of the game. We played with quality, rhythm, intensity, retrieving the ball and not struggling at the back.
"We didn't concede a goal. We played a good game. I'm happy with this.
"Of course, when you don't manage to score a second with a few chances you have bad times in the end.
"But sometimes this could be good for the team, so we learn to suffer together and to fight as we did."
The two sides meet again at the Bernabeu next Tuesday for the second leg.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.