The result means Medvedev will relinquish his position at the top of the world rankings after the tournament ends, while Kyrgios will appear in his first US Open quarter-final when he faces another Russian playing under a neutral flag, Karen Khachanov, on Tuesday.
Medvedev later said he struggled physically on the court, but added that Kyrgios outplayed him in the last two sets.
“Today, I felt a little sick,” he told reporters after the match. “The thing is in America, I get sick one time for sure in the swing because the AC (air conditioning) is just crazy. Last year it happened in Cincinnati.”
“I felt my throat a little bit today… At the same time it’s no excuse at all because Nick played well.”
It was the fourth time Kyrgios had beaten Medvedev in five meetings and the second time in as many months after winning in Montreal.
The Australian saved several set points in a close first-set tie — the first set Medvedev had dropped in the tournament — before falling behind in the second set when he dropped serve twice.
Medvedev leveled the match, but momentum swung in Kyrgios’ favor when he won five straight points on Medvedev’s serve in the fourth game of the third set.
The 23rd seed always looked the favorite to win the match from there, breaking twice in the fourth set to seal the victory in close to three hours. He finished the encounter with 53 winners, 21 of which were aces.
“I just thought I played the right way,” Kyrgios told reporters. “I came back incredible today. Just thought the third and fourth sets were so free. I just had a lot of fun, embracing every moment out on Ashe (Arthur Ashe Stadium) today. Really proud of that.”
“I feel like I’m more just proud of the way I came back after everything, honestly,” he said. “I’ve been in some really tough situations mentally, and in some really scary places.
“Obviously, if you look at it on paper, I probably didn’t expect to win that. Maybe take a set or two if I’m lucky … I’m just sitting there in the locker room afterwards and I’m just super proud of the performance because there was really a time where I didn’t think I was capable of producing and doing that any longer.”