It looked a horrible draw for Britain’s only male singles player but he stepped up superbly in the absence of the injured Andy Murray.
Seven months after losing to Anderson in five sets in the third round of the French Open, Beverley’s Edmund recovered from two sets to one down to win 6-7 (4/7) 6-3 3-6 6-3 6-4.
Edmund had a bad habit in 2017 of losing close matches but was near faultless at the big moments and clinched victory on his first match point after three hours and 59 minutes.
The 23-year-old next faces Uzbek Denis Istomin, who defeated Novak Djokovic in the second round 12 months ago.
Openings were always likely to be few and far between and, after 12 games that saw Edmund save the only two break points, Anderson edged the tie-break by taking the final two points against the Yorkshireman’s serve.
Facing big servers accentuates the magnitude of each half-chance and the key for Edmund was to make sure he did not let those slip away.
After Anderson had gone four straight service games and the tie-break without conceding a single point on his own delivery, Edmund seized his opportunity in the sixth game of the second set.
A sizzling backhand down the line set the tone and he took his second break point before going on to serve out the set confidently.
Edmund put together a new coaching team of Swede Fredrik Rosengren and Brit Mark Hilton at the end of last season and the trio have worked hard on improving Edmund’s serve and trying to help him turn those close losses into wins.
He had just saved two break points in the eighth game of the third set when light rain began to fall, forcing the players to take a short break.
On the resumption, 11th seed Anderson converted his third chance and served out for a two-sets-to-one lead.
It was a reversal of their French Open clash, where it was Edmund who had the lead after set three, but the 23-year-old quickly took the initiative at the start of set four.
Edmund had been hugely impressive at the crunch moments and, after breaking Anderson to lead 2-0, he recovered from 0-40 in the next game.
He was starting to really put pressure on the Anderson serve and had chances in two more games before eventually serving it out to force a decider.
Anderson made the early breakthrough to lead 2-0 but Edmund hit straight back, pumping his fist and roaring.
He saved a break point in the sixth game after receiving some treatment to his right shoulder but then took advantage of Anderson’s over-hitting to break for 4-3 and served it out to love.