The 20-year-old Italian erased five match points against Pablo Carreno Busta in a 5-7, 7-5, 7-5 victory.
Medvedev beat Murray 6-4, 6-2 in the fourth round of the season's second ATP Masters 1000 event and will face Spaniard Pedro Martinez next.
In a tense match at Hard Rock Stadium, both men showed off their creative shotmaking, with the picks of the bunch coming in the second set.
Swiatek clinched the top spot with a 6-2, 6-0 victory over Viktorija Golubic of Switzerland in the second round of the Miami Open.
The Australian wild card defeated Andrey Rublev, the fifth seed, 6-3, 6-0, to advance to the third round of the competition.
The 24-year-old from Japan won in straight sets for the second day in a row, this time against 13th seed Angelique Kerber 6-2, 6-3.
The first set was a back-and-forth affair as both players gave their best but Murray used all of his skill and experience for the win.
Medvedev is 1,100 ATP Ranking points ahead of world No.3 Alexander Zverev and 150 points ahead of world No.2 Novak Djokovic.
The Australian-ace will make his first appearance at the Indian Wells after clinching the Australian Open 2022 doubles titles.
After the tournament was cancelled in 2020, Barty returned in 2021 and successfully defended her title.