After Wozniacki came back she then broke the Dane late in the third set, screaming "come on" after gaining the advantage.
"These are the types of matches I train for so it's really rewarding to win that last point". "I think she doesn't really talk to anybody and just, you know, has her team and has her own thing and that's that. And I think in the third set we both played well".
The Russian, who was hit with a two-year doping ban - later reduced to 15 months - for testing positive to banned substance meldonium at the 2016 Australian Open, hasn't won a major since her 2014 triumph at the French Open.
Sharapova, a four-time finalist at Melbourne Park, will face Australian No.1 Ash Barty for a place in the quarterfinals on Sunday.
She was ahead 3-2 in the deciding set but was broken twice from there to lose the match that went for almost two and a half hours. But Sharapova finally gained the upper hand with a break for a 4-3 lead, clinched with that big forehand she was so excited about.
"The level was quite high", Sharapaova said.
Antarctica's melt quickens, risks metres of sea level rise
Warming ocean water will only speed up ice loss in the future, and experts say sea levels will continue to mount for centuries, no matter what human do now to rein in climate change.
Not only had she lost her Australian Open title, she had lost a battle against Maria Sharapova that was always going to be more than just a tennis match.
In other women's matches Friday, 17-year-old American Amanda Anisimova showed why there are those who consider her a possible future star, producing one spectacular shot after another to upset 11th-seeded Aryna Sabalenka of Belarus 6-3, 6-2 and reach the fourth round.
Anisimova could meet her idol Sharapova in the final eight, if the Russian topples Barty and she wins her next match against either No 8 seed Petra Kvitova or Switzerland's Belinda Bencic.
She said she was excited ahead of the Wozniacki meeting and enjoyed being on centre court again facing a top opponent.
"I knew I was going to get a really tough match as she's the defending champion of this event and it's no secret she loves this arena", she said.
Sharapova, the champion here in 2008 and who fell in the third round to Angelique Kerber a year ago, ran her opponent ragged this time, coming back from 1-4 to claim the first set.