Red cards spoil Real progress into cup semis
Karim Benzema netted just before half-time to put Jose Mourinho's side 3-0 up in the tie, before Coentrao picked up a second yellow card for a handball in the 51st minute.
Valencia pulled a goal back from the ensuing free-kick when Tino Costa's low kick surprised Real's reserve keeper Antonio Adan.
Adan had to replace Casillas in the 15th minute after Real defender Alvaro Arbeloa accidentally kicked his left hand while trying to clear a loose ball in the area.
Di Maria picked up a foolish red card two minutes from time after kicking out at Valencia defender Joao Pereira as the two tussled for a ball.
Real will face either holders Barcelona or Malaga in the last four. Barca visit the Rosaleda on Thursday with their tie level at 2-2.
"We came with a healthy advantage from the home leg and after the first goal it got tricky," Real midfielder Xabi Alonso told Spanish television.
"With a player less we played an intelligent game."
On the other side of the draw, Alvaro Negredo scored twice to help Sevilla past nine-man Real Zaragoza with a 4-0 quarter-final second leg victory.
The Spain striker netted with a header and a penalty, while Croatia midfielder Ivan Rakitic and Manu del Moral grabbed the others to complete a 4-0 aggregate win.
Zaragoza had defender Jose Fernandez sent off with a straight red card after only 26 minutes, and midfielder Fran Gonzalez followed him down the tunnel in the 66th, after giving away the penalty for Sevilla's third.
The 2010 Cup winners will meet either Atletico Madrid or city rivals Real Betis in the last four.
Atletico, who lost against Sevilla in the final three years ago, hold a 2-0 advantage ahead of Thursday's trip to play Betis.
Real were forced into an early change at the Mestalla after Casillas picked up his injury and had to be replaced.
"It's a little bit sore after the blow I received from Alvaro, but we have to wait for the tests to find the full extent of the injury," Casillas told reporters after the game.
"The doctor is optimistic, but with these types of injuries you have to go into detail. There was something I didn't like very much. It's around the index finger. I hope it is nothing."
Valencia defender Ricardo Costa failed to cut out Xabi Alonso's pass into the area in the 44th minute, leaving France striker Benzema free in the area to fire past Vicente Guaita.
Portugal defender Coentrao's sending off allowed Costa to thump a shot through a crowd of players and past Adan but Valencia rarely looked like adding to the score.
The game was getting tetchy in the closing stages when Argentina winger Di Maria flicked his leg out at Pereira.
"The images are there for everyone to see," Real's assistant coach Aitor Karanka told a news conference, when asked about the red cards.