It looked like the top seed would make quick work of Rogers in the rain-delayed encounter after romping through the first set in 26 minutes.
But world number 116 Rogers kept her composure and got the better of Williams as the first meeting between the two big-hitting Americans turned into a slugfest. Rogers sealed the win when Williams sent a backhand long on match point.
Roland-Garros
What will Roland-Garros postponement mean for tennis calendar?
08/04/2021 AT 18:39
Speaking after her victory, the 27-year-old said: "It's every kid's dream when they are growing up watching her play and to be able to do something like that."
Commenting on the absence of fans due to the Covid-19 pandemic, Rogers added: "Weird circumstances. Weird setting. But a win is a win. I know we're all just happy to be playing."
Rogers will face Switzerland's Jil Teichmann in the semi-finals at Lexington.
Williams was hoping the tournament would help her to get into top form for the US Open, which is due to start on August 31, despite the Covid-19 pandemic and will be the first Grand Slam since the Australian Open in January.
But having been stretched to three sets in all three of her matches this week, the 38-year-old may well have work to do if she is to launch a serious campaign for the elusive 24th Grand Slam title to equal Margaret Court's record.
"I could play a lot better, I think that's the main thing I can take from this match," Williams said.
"I made it difficult on myself by making a plethora of unforced errors."
In the other quarter-final of the day, 16-year-old Coco Gauff battled back to defeat Tunisian Ons Jabeur 4-6 6-4 6-1 and will next face fellow American Jennifer Brady.
Additional reporting by Reuters.
Roland-Garros
French Open 2021 - How to watch Roland Garros and more key info
07/04/2021 AT 13:06
ATP Madrid
Federer in, Serena out - What does Madrid entry list mean for legends' seasons?
07/04/2021 AT 13:01