Fourth seed Muguruza won 7-5 6-4 to make amends for losing last year's Wimbledon final against Williams.
The 22-year-old is Spain's first female champion at Roland Garros since Arantxa Sanchez-Vicario in 1998.
Williams, 34, had hoped to win a 22nd Grand Slam singles title and tie Steffi Graf's Open-era record.
"I'm so, so excited - to play in a Grand Slam against one of the best players, it's the perfect final," Muguruza said.
"I'm so happy. I had to be very ready and concentrated on all the points and just to fight as much as I can.
"All the matches I've played against her helped me. It's our favourite tournament in Spain and I want to thank all my Spanish supporters."
Williams had reached the final despite reportedly struggling with a thigh problem, but the defending champion began in terrific form, moving freely as she made the early running.
It was all Muguruza could do to hang on, a forehand and an ace seeing off early break points, and it was Williams who faltered first by dropping serve with a double fault at 2-2.
With both players hitting huge groundstrokes and vying for control of the rallies, Williams looked to have gained the upper hand with three games in a row taking her 5-4 in front.
However, Muguruza played a nerveless service game to stay in the set and then clinched it with some wonderful hitting down both tram lines.
The second set began with three breaks of serve but it was still Muguruza who was dictating, another stunning forehand into the corner moving her into a 3-1 lead.
Muguruza was prepared to concede double-faults - her tally ending up at nine - to keep Williams at bay on her second serve and it proved a successful tactic.
Williams could not fashion a break point in the latter stages of the second set and did well to fend off four match points on her own serve in game nine.
Muguruza remained rock solid, however, finally converting on her own serve with a lob that caught both players by surprise, before the Spaniard fell to the clay in celebration.