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."
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.
"It was OK," she said. "I'm not one to ever make excuses and say, like, 'Oh, my adductor was hurting,' or whatever.
"At the end of the day I didn't play the game I needed to play to win and she did. Adductor or not, she played to win.
"She won the first set by one point. I mean, that just goes to show you that you really have to play the big points well, and she played the big points really well.''
The American has now missed out in three consecutive Grand Slams, and will head to Wimbledon later this month looking to defend her title and finally land a 22nd major.