Evans trailed by two sets to love against Alexei Popyrin but prevailed in a deciding tie-break.
The British number one was staring at another loss in the last 32 of a slam when big-hitting Popyrin took the opening two sets but Evans dug in and battled his way to a 4-6 3-6 6-3 6-4 7-6 (1) victory.
The 31-year-old’s only previous visit to the fourth round at a major came back in 2017 at the Australian Open and his reward is a crack at second seed Daniil Medvedev.
Evans, who had only once previously come back to win a match from such a position, played a superb final-set tie-break and crouched down with his head in his hands when Popyrin double-faulted on match point.
The Briton said in an on-court interview broadcast by Amazon Prime: “I didn’t think I did a bad job really in the first two sets.
“I think he dropped a little bit. In the fifth he started to go back that way, serving a lot better. I played a good tie-break. It was tough. I’m lookingforward to relaxing.
“Coming back from Wimbledon where I was poor in the third round, it was difficult. My focus was really third round here once I got there was to put in a good performance today. I could have lost that match pretty easily. I had a great effort regardless so I’m proud of what I’ve done.”
Evans went into the match with concerns over a groin problem after he withdrew midway through his doubles match on Thursday, with singles very much the priority.
The 24th seed made the perfect start with a break to love in the opening game, but Popyrin began to find his range and was soon applying real pressure to the Evans serve.
He retrieved the break in the eighth game and rode his momentum to a fourth successive game to claim the set, hitting huge forehands and showing his talents at the net.
Evans dug in at the start of the second but the match was being played very much on Popyrin’s terms now and the Australian surged into a 4-1 lead.
There were a few positive signs from Evans late in the set but the damage was done and he paid the price for passive returns on the Popyrin second serve.
It has been a tough couple of months for Evans after a debilitating bout of coronavirus forced him to miss the Olympics and left him struggling physically.
Battling wins over Thiago Monteiro and Marcos Giron meant a huge amount to the man from Solihull and he was certainly not about to admit defeat.
Probing of the Popyrin serve earned its rewards with a break for 4-2 in the third set on a brilliant lob, and the comeback was very much on when Evans opened up a 2-0 lead in the fourth.
Back came Popyrin, with Evans calling the doctor midway through the set, but it was the British number one who got the better of five breaks to push the contest to a fifth set.
It was the best set of the match, with the pair contesting a series of crowd-pleasing points and holding their own through to a deciding tie-break, where Evans stepped up at just the right moment.
On Saturday, Emma Raducanu will try to match her compatriot when she takes on Sara Sorribes Tormo.
The 18-year-old retired during her fourth-round clash against Ajla Tomljanovic at Wimbledon with breathing difficulties but has already shown her physical improvements with five wins across qualifying and the main draw.
Her conditioning is sure to be tested on Saturday against Spaniard Sorribes Tormo, whose fine year included victory over Ashleigh Barty at the Olympics.
Raducanu said: “Wimbledon just taught me how physical I had to be for every single match and at the end it was my physicality that let me down.
“But that was my first tournament on the tour at such a high level so, having played four, five weeks, I’m still extremely fresh and new to the whole situation but I think, given the matches I’ve played, I’m able to keep up a lot more physically and I think that’s definitely the biggest standout thing in my game that is going to take me far or is going to limit me.”
The winner of the match is likely to earn a shot at Wimbledon champion Barty in the last 16.