Rafael Nadal heading to the beach after Wimbledon exit
Nadal has not reached the quarter-finals at the grass-court grand slam since 2011 and he struggled against the powerful serves and shots of his 19-year-old opponent in his latest attempt.
For the fourth consecutive match the second seed lost the opening set but when he levelled 47 minutes later normal service looked set to resume.
However, Kyrgios was in no mood to lie down and as he racked up 37 aces in the match he recorded a 7-6 (7-5) 5-7 7-6 (7-5) 6-3 victory, the biggest of his career.
Nadal admitted his opponent had surprised him at times but conceded surprises can happen on grass if one player is playing at his best.
"I do not think I played really badly, but that is tennis on this surface," he said. "I was not able to read his serve during the match and I was not able to make enough returns.
"On this surface when you have an opponent that decides to serve and to hit every ball very hard like that, you are in trouble.
"Congratulations to him. For me, [it is the] beach in Mallorca."
Kyrgios' reward for knocking out the two-time champion is a last-eight clash with Canada's Milos Raonic.