The 24th seed Muguruza, who stunned Williams in the second round at Roland Garros last year, threatened another upset as she tore through the first set with a barrage of sweetly-struck winners on a cool, windy day.
"Someone in the crowd said 'come on Serena, use spin,'" Williams said in a courtside interview. "There are coaches everywhere here."
Williams later told reporters the advice had hit home. "I was like, 'you're right. I'm trying to do that anyway, but I wasn't doing it'.
Serena v Sharapova, Federer v Ferrer: Tennis’ most surprising head-to-head records
28/09/2022 AT 10:10
"It's been really great. I hear my name throughout the whole stadium like 360 (degrees). I don't get that everywhere. It feels good."
Australian Open - Watch LIVE on British Eurosport
Total Australian Open coverage on Eurosport Player
Williams has started slowly in all her matches at Melbourne Park before rallying and did so again against 21-year-old Muguruza, who showed she has the shots to trouble the world's top players.
The American needed her ever-reliable serve to get her out of a number of jams and saved six break points in a fiercely contested second game of the decisive set. The tough hold helped Williams zero in on the finish line and the American 18-times Grand Slam champion was bullet-proof from there on, though Muguruza scrapped hard until the final ball.
A fan may have woken Williams up, but her regular coach Patrick Mouratoglou was given most of the credit for keeping her at the top of the heap at the age of 33.
"I think Patrick has brought a lot more than one or two things," said Williams. "I think he's brought a lot of consistency to my game, a lot of motivation, a lot of strategy. I go into a match knowing exactly what to expect, what to do.
"It makes my life a lot easier. The motivation is really unbelievable that he has. We're a lot alike. He's a perfectionist. I'm a perfectionist. So when I'm not where I need to be, he is there.
"He's like, 'you have to be better. There's no other option but to be better'. If I want to continue to play, we're working on new things."
Williams was ecstatic with the win, having failed to get past the fourth round at any of the three slams apart from the US Open last year. She will play last year's losing finalist Dominika Cibulkova for a place in the semi-finals, after the pint-sized Slovakian dumped out two-time champion Victoria Azarenka with an impressive display of clean hitting.

Serena Williams consoles Garbine Muguruza at the end of their Australian Open match (Reuters)

Image credit: Reuters

US Open
'I just needed to stop' - Williams opens up about retiring at US Open
27/09/2022 AT 10:02
WTA Seoul
Raducanu beats Uchijima to reach second round in Seoul
21/09/2022 AT 15:16