"You know, sometimes it happens, you just don't take your chances," said the 10th-seeded Dane, who had appeared to be on course for a sixth appearance in the fourth round in seven visits to Melbourne Park before she lost 4-6 7-5 6-3.
"I had quite a lot of chances. I won the first set; was up in the second. I don't think I did anything particularly wrong."
Wozniacki had been in trouble early against the hard-hitting Venezuela-born player and was struggling at 2-4 in the first set with seemingly no way to stop the 20-year-old from blasting winner after winner.
Muguruza, however, went to pieces as Wozniacki forced her to extend rallies and shots that had been landing in just minutes before flew wide.
The errors continued to mount, as did her nerves, which allowed the Dane to pounce and rattle off four successive games to seal the first set in 39 minutes.
However, Muguruza, who arrived in Melbourne in good form after winning the warm-up tournament in Hobart as a qualifier, rallied to clinch the second set in just under an hour on Rod Laver Arena.
With both serves under pressure in the decider, the key was the fact that the Spaniard converted all four of her break points while Wozniacki could only convert two of the five opportunities she had.
"I had breakpoints in I think the three last games she was serving. Not the last one, but I had chances to get away there and probably close the match," Wozniacki said.
"Obviously you can always look back and say you could have done this or that, but yeah ...it was just a bit unlucky."
Muguruza next meets fifth seed Agnieszka Radwanska of Poland in the fourth round. It is the first time she had reached the last 16 in a Grand Slam.
"The key was more to be strong mentally, especially in the third set, because we both were playing so good," she said.
"To be strong, like to keep fighting was the difference.
"It's a great win. It's a great win. I think is the first time, no, not the first time I (beat) a top 10 player.
"But is amazing to win (on) centre court (against) a top 10 player like Caro. So I'm really happy."
Victoria Azarenka remained on course for a third straight Australian Open title with a thumping 6-1 6-0 victory over Yvonne Meusburger.
The second seed reached the fourth round when she broke the Austrian world number 49 for the seventh time with a thundering smash at the net to bring an end to a thoroughly one-sided contest on Rod Laver Arena.
Azarenka has not lost a set in her three matches this week and extended her winning streak at Melbourne Park to 17 matches.
The Belarussian will next meet American Sloane Stephens, who she beat in controversial circumstances in the semi-finals last year on her way to her second successive Australian Open title.
Third round results:
Garbine Muguruza Blanco (Spain) beat 10-Caroline Wozniacki (Denmark) 4-6 7-5 6-3
5-Agnieszka Radwanska (Poland) beat 29-Anastasia Pavlyuchenkova (Russia) 5-7 6-2 6-2
13-Sloane Stephens (U.S.) beat Elina Svitolina (Ukraine) 7-5 6-4
3-Maria Sharapova (Russia) beat 25-Alize Cornet (France) 6-1 7-6(6)
8-Jelena Jankovic (Serbia) beat Kurumi Nara (Japan) 6-4 7-5
11-Simona Halep (Romania) beat Zarina Diyas (Kazakhstan) 6-1 6-4
20-Dominika Cibulkova (Slovakia) beat 16-Carla Suarez Navarro (Spain) 6-1 6-0