Reaching the Wimbledon final has whetted the Australian's appetite for more success on the big stage and he produced a superb display of power and touch to win 7-6 (11) 3-6 6-3 6-2.
Medvedev defeated Novak Djokovic to win his maiden grand slam title in New York 12 months ago but he was beaten by the better player under the lights on Arthur Ashe and will now lose the number one ranking.
Rafael Nadal is in pole position to take over at the top but Casper Ruud, who defeated Corentin Moutet earlier in the day, is also in contention along with teenager Carlos Alcaraz.
Kyrgios said: "It was an amazing match. I played really well. I've been playing amazing the last couple of months but what a place to do it. I'm just trying to work hard every day. I'm just really happy and hopefully I can keep it going. I want to go all the way. Hopefully it's possible."
Aside from Serena Williams, who Medvedev had very much been playing second fiddle to in the night sessions, this was the most anticipated match of the tournament so far.
As well as being two of the best players in the world, Medvedev and Kyrgios are both hot-headed characters prone to creating drama.
Medvedev has largely reined in his worst excesses while Kyrgios has discovered a passion for winning tennis matches but has still been fined this week for spitting on court.
This was their fifth meeting and third this season, with Medvedev winning at the Australian Open but Kyrgios coming out on top in Montreal last month.
It was the Australian who drew first blood, whipping up the crowd when he created a break point at 3-2 and taking it.
But Medvedev is quite happy playing the same games and he mimicked the gesture twice before breaking back immediately.
The set really came alive in an extraordinary tie-break. Having led 4-1, Kyrgios slammed his racket to the court as Medvedev levelled at 5-5, but the Russian could not take any of three set points.
Momentum swung towards Kyrgios and, after another slam of his racket at a missed opportunity, he played an ice cool drop shot and then clinched his fourth set point.
Both players were complaining to umpire Eva Asderaki-Moore, Kyrgios about her starting the shot clock too early and Medvedev about his opponent's support camp, who were once again on their feet after every point.
Medvedev made a fast start to the second set and Kyrgios appeared to give it up before a late rally got him dialled in for the third.
Medvedev came to check on Kyrgios after the Australian fell heavily to the court in the second game and lay motionless for several seconds, with the pair exchanging a hand tap before continuing.
Two points later came a bizarre moment when Kyrgios appeared to have set up a break point but came round the net post to whack away a ball on Medvedev's side, thus forfeiting the point.
The 23rd seed, who was unaware of the rule, was able to see the funny side and he began to really go after the Medvedev serve, breaking in the next game.
From there, Kyrgios - barring a warning for swearing - did not look back, breaking through Medvedev's considerable powers of defence time and again and sealing one of the best victories of his career with a 21st ace.
In the last eight, Kyrgios will take on another Russian in Karen Khachanov, who defeated Pablo Carreno Busta 4-6 6-3 6-1 4-6 6-3.
There was also a five-setter between Matteo Berrettini and Alejandro Davidovich Fokina, which the Italian 13th seed won 3-6 7-6 (2) 6-3 4-6 6-2.