The 144th-ranked Kyrgios, a wild-card entry, hit 37 aces and delivered a between-the-legs winner on one point. He is the first man to get to the quarterfinals in his Wimbledon debut in 10 years.
He's also the first player ranked outside the top 100 to beat the No. 1 man at a Grand Slam tournament since No. 193 Andrei Olhovskiy defeated Jim Courier at Wimbledon in 1992.
Nadal, who owns 14 major singles titles, has appeared in five finals at the All England Club. But he lost in the second round in 2012 and the first round in 2013 -- to men ranked 100th and 135th.
In each of Nadal's first three matches this year, he dropped the first set before coming back to win. He again fell behind against Kyrgios, but could not turn the match all the way around this time.
Kyrgios was playing in only the fifth Grand Slam tournament of his career and was the youngest man in the Wimbledon field. In the second round last week, Kyrgios saved nine match points while beating 13th-seeded Richard Gasquet.
The fourth-seeded Federer, who has not dropped a set in the entire tournament, overwhelmed the Spaniard 6-1, 6-1, 6-4 in just over 90 minutes on No. 1 Court. He hit 11 aces, faced only one break point -- in the final game of the match -- and broke four times in a performance that showed he remains a real contender at the age of 32.
"It's really nice the way I'm playing," Federer said. "I'm serving well, moving well, returning all right, so all the things are happening that need to be happening to go deep in this tournament again."
Federer received a standing ovation after closing out the match with a serve-and-volley point, hitting a backhand volley that Robredo couldn't handle.
The win avenged Federer's straight-set loss to Robredo in their last meeting in the fourth round of the U.S. Open. Apart from that defeat, Federer has won all of his 11 matches against the Spaniard.
Federer has lost only 32 games in four matches at the All England Club, the same number as defending champion Andy Murray.
"Clearly I'm very pleased with the first week, and here we go now into the quarters," Federer said. "It's always really exciting being so deep into a tournament and feeling you are closer to the finish line.
"I've played a lot of matches so things are exactly where I want them to be, but then again you're sort of only in the quarterfinals and that's when the tournament kind of really starts."
Federer holds a 13-2 record against Wawrinka, though Wawrinka won their last encounter in the Monte Carlo final in April.