Hurkacz began struggling with a rib problem during the fourth set and appeared increasingly restricted in his movement.
He received treatment from the physio several times before deciding he could not continue.
The retirement was another injury setback for the Pole, who was playing at the All England Club for the first time in two years after missing the 2025 tournament and suffering a serious knee injury during his second-round match at Wimbledon in 2024.
Hurkacz reached the last 16 after defeating 11th seed Norwegian Casper Ruud of Norway, Austria's Sebastian Ofner and 21st seed Tommy Paul of the US.
The 29-year-old's best Wimbledon result remains his run to the semi-finals in 2021.
(ał)
Source: PAP