Rybakina, who represents Kazakhstan, had not previously been past the second round at Roland Garros but she was in superb form against 23-time grand slam winner Williams, storming to a 6-3 7-5 win in one hour and 19 minutes to reach the quarter-finals.
Russian-born Rybakina was excellent value for her stunning win on Sunday, converting five of her seven break points and winning almost 60 per cent of points returning Williams' second serve.
Far from being disappointed at her early exit, Williams said she was just pleased to have put together a run of three consecutive wins on clay before Sunday's defeat.
"I got some good matches in here," Williams told a media conference. "I did not have the best clay-court season, but it was good to finally get some wins on clay. I'm in a much better place than when I got here.
"It was definitely close. There is literally a point here, a point there, that could change the whole course of the match. I'm not winning those points. That literally could just change everything."
Asked if it might be her final French Open match, the 39-year-old American said: "I'm definitely not thinking about it at all. I'm definitely thinking just about other things but not about that."
One of those "other things" will be Wimbledon, where she has been a singles champion seven times. Asked when she would travel to London for the tournament that begins on June 28, Williams said: "[I will] possibly go home and regroup and then get ready for London. But I don't know. I have to get there early for quarantine, so, yeah, it has to be pretty soon."
Rybakina, who will face Anastasia Pavlyuchenkova in the quarter-finals, had never faced Williams before.
She said: "When I was small, of course I was watching her matches on TV. It's difficult to expect anything because you watch on TV and it's completely different when you come on court and you feel the power and everything. I knew that the serve was going to be difficult for me to return. She's powerful, but I was ready."
PAVLYUCHENKOVA ENDS LONG WAIT FOR LAST-EIGHT SPOT
Pavlyuchenkova reached the quarter-finals of the French Open for the first time in 10 years with a 5-7 6-3 6-2 victory over 15th seed Victoria Azarenka.
It is the seventh grand slam quarter-final for Pavlyuchenkova, who is seeded 31st at Roland Garros, and her first outside Australia in five years.
The Russian had lost to Azarenka in five of their last six matches and looked set for more disappointment when the Belarusian powered back from 3-1 down to take the first set.
However, Pavlyuchenkova fought back in style, hitting 24 winners and making just 11 unforced errors over the next two sets to book her last-eight spot in two hours and nine minutes.
"It's tough to remember what I felt like 10 years ago," she said. "I'd say completely different. I'm very happy also now. I think I feel a little different. I feel more mature. It's a good moment, I'm enjoying it, but I've got work to do.
"I hope I show more maturity as well, smarter tennis, more consistent. I feel quite fit as well, considering the fact that I'm not the youngest on tour now.
"I know what I have to do and I know what I want to do; I'm trying to work for that."
Reflecting on her defeat, Azarenka said: "There's always some positives. The most positive thing I will say from this week, not the whole season, is that I've been able to play pain free. That was my goal here. Everything else is something that can be analysed later."