The 17-times grand slam champion from the United States never got into her stride against the 20-year-old world No.35 who claimed the greatest victory of her young life.
Muguruza, whose pace was too much for Williams to handle, will next face Slovak teenager Anna Schmiedlova, victor over Serena's older sister Venus about an hour earlier.
"Of course it's amazing, I did not expect that. Today is a great day," said Muguruza. "I'm very happy," she then shouted at the crowd.
"She (Serena) said that if I continue playing like this, I can win the tournament. I said, I will try, I will try,"
Williams failed to hold serve in the second set, which confirmed the impression of the opener, during which Muguruza sent the American chasing the ball in every corner.
Williams bowed out after 64 minutes having never looked in a position to unsettle Muguruza, whose best result in a grand slam was at this year's Australian Open when she reached the fourth round.
The top seed had not been knocked out of a grand slam before the fourth round since she lost in the first round of this tournament two years ago.
"Nothing actually worked, I just can't serve," said Williams with a smile. "It was one of those days, you can't be on (your game) every day."
SERENA TWEETS: Congrats 2 my opponent today. She did her thing. I'm proud of her. I wish her well. Until next time. There's always tomm & I will be ready.
Williams refused to blame her defeat on the windy conditions on yet another chilly day in Paris, a city she has a special relationship with.
She has a French coach in Patrick Mouratoglou, owns an apartment in Paris and loves to shop in the French capital, which she considers her second home.
"It's not easy. I love it here, but there's always next year. At least I won't have any points to defend next year, so I look forward to it," she said.
Until then, she will be back to training, harder than ever.
"It's great, because I'm going to go home and work five times as hard to make sure I never lose again," she said.
"I want to win and I want to be the best, that's my whole goal.
"But it's great sometimes to get knocked down because you have to get back up. I love getting back up. I love the challenge.
"I haven't gotten past the fourth round of a grand slam this year," added Williams, whose last grand slam title was at Roland Garros last year.
"I have a couple of words to describe it, but I think that would be really inappropriate so I'm going to leave it at that."
Williams's defeat, added to that of second seed and Australian champion Li Na in the first round on Tuesday, opened up the draw for last year's runner-up Maria Sharapova, who takes on Bulgarian Tsvetana Pironkova later on Wednesday.
Follow the French Open on up to 7 courts LIVE on the Eurosport Player!
- Sports & Recreation