Medvedev is the 2021 U.S. Open champion and the No. 2 seed here, but he struggled Monday, and Cilic took advantage.
"I enjoyed the atmosphere, I enjoyed the night session here," Cilic said in his postmatch interview on the court. "I played incredible tennis, one of the best matches of my career, from start to finish."
The victory sets up a Wednesday date with No. 7 Andrey Rublev in an interesting round on the men's side that will also include Holger Rune, a 19-year-old from Denmark, against No. 8 Casper Ruud, a 23-year-old from Norway.
Earlier in the day, Rune eliminated 2021 French Open runner-up Stefanos Tsitsipas to reach his first major quarterfinal in his Roland Garros debut.
Fortieth-ranked Rune beat fourth-seeded Tsitsipas 7-5, 3-6, 6-3, 6-4 at Court Philippe Chatrier on Monday in Paris.
Tsitsipas is the first player seeded in the top eight to leave the men's bracket.
"I was very nervous on the court, being frustrated a lot," Tsitsipas said after the match. "And I knew I was this way, but I couldn't stop being like this."
Rune never had won a Grand Slam match until last week, going 0-2 in previous appearances at the sport's top four events.
But the hard-hitting 19-year-old now joins sixth-seeded Carlos Alcaraz to make this the first Slam tournament with two teenagers in the men's quarterfinals since Hendrik Dreekmann and Andrei Medvedev at the 1994 French Open.
"These kids are going to want to beat me badly because obviously they are chasing," Tsitsipas said. "I'm chasing too, but I'm at a different kind of position than they are. I'm hungry to beat them too. Now that they have beat me, I want pay back."
Rune had a bit of trouble closing things out against Tsitsipas after going up 5-2 in the fourth set. Rune dropped nine points in a row and his lead narrowed to 5-4. Then he needed to save three break points before serving out the biggest victory of his career.
Rune's next opponent, Ruud became the first man from Norway to get to the round of eight at the French Open. Ruud reached his first career Grand Slam quarterfinal by defeating Hubert Hurkacz 6-2, 6-3, 3-6, 6-3.
Twelfth-seeded Hurkacz was a semifinalist at Wimbledon last year. He had lost in the first round of the French Open in three consecutive appearances.
Rublev, into the quarterfinals for the second time in three years, advanced after his fourth-round opponent, 11th-seeded Jannik Sinner, stopped playing because of a problem with his left leg. Rublev was leading 1-6, 6-4, 2-0 when Sinner retired, grimacing as he walked off the court. Sinner's leg was treated by a trainer during his previous match and then again Monday.
Rublev has lost a set in every match he has played this year at Roland Garros on the way to his fifth career Grand Slam quarterfinal.
The Associated Press contributed to this report.