A fascinating encounter took a disappointing turn with Cilic leading 4-1 in the fourth set when world No. 1 Nadal took a medical timeout and was obviously struggling on his return to the court.
The Spaniard gallantly battled on into the deciding set and managed to stay competitive with a firing Cilic despite an obvious limp.
However, he could not last the distance. After finally being broken to go 0-2 down in the fifth, Nadal called time on the match to see Cilic through to the semi-final, where he will face unseeded Briton Kyle Edmund.
"Tough moments. It's not the first time here. An opportunity is gone for me. I am a positive person and I can be positive, but today is an opportunity lost...it's really tough to accept," Nadal said after the match, per the New York Times' Ben Rothenberg.
He added: "Somebody who is running the tour should think a little bit about what's going on. Too many people getting injured."
The opening set was as routine as it got for Nadal in the three-hour, 47-minute encounter.
Cilic saved five break points for 3-3 in a lengthy sixth game before handing Nadal a 5-3 lead after some costly mistakes.
The top seed served out the opener and then went 3-2 ahead in the second as Cilic double-faulted at 15-40 down after being hit with an unfortunate time violation:
The setback seemed to galvanise the 2014 U.S. Open winner, though. He upped his aggression to great effect, coming to the net more and varying his shot selection brilliantly.
Sixth-seeded Cilic reeled off four games in a row to take the second set, his newfound confidence illustrated by a pair of aces at the crucial moments in the final game:
The momentum had noticeably swung as Nadal began to show frustration versus Cilic, who continually produced winners; the Croatian hit 83 to his opponent's 39 during the match.
Cilic applied pressure in almost every Nadal service game in the third, and although he was unable to break, he looked to have the upper hand heading into the tiebreak.
It was Nadal, though, who earned the first set point at 6-5 in the breaker after Cilic missed a forehand, and the 16-time Grand Slam winner needed only one chance as he moved 2-1 ahead with a smash.
Displaying confidence and composure befitting a Grand Slam champion, Cilic did not let his level drop. His fantastic variation—including a stunning pick-up in the fourth game of the fourth set—saw him earn the first break and move 4-1 ahead.
After Nadal's medical timeout, it became increasingly clear he was struggling. Some huge forehands from Cilic saw him level up the match at 2-2 with another break.
At 1-0 down in the fifth, Nadal managed to save five break points. But when Cilic finally move 2-0 ahead with a fantastic crosscourt forehand, the Spaniard conceded defeat.