This was the first time that the 24-year-old Polish tennis star had reached the quarterfinals, while Federer was appearing in his 18th.
If the eight-time champion’s exit was a surprise, the manner of it was even more so — Hurkacz triumphed in three sets — 6-3 7-6 (7-4) 6-0.
The 39-year-old Federer was seeking to become oldest man to reach Wimbledon semifinals in the Open era, but he looked a shadow of the player that has graced Centre Court.
The Swiss star made 31 unforced errors; Hurkacz made just 12.
Federer underwent two knee surgeries in 2020 and had been targeting a ninth Wimbledon title on his favorite grass court surface.
In June he had withdrawn from the French Open after his third-round win over Dominik Koepfer to protect his knee.
Federer’s defeat was only his 14th in 119 matches at Wimbledon.