After playing imperious tennis in the first set, Sharapova couldn't maintain her level as Barty roared to life on Rod Laver Arena, battling through the last two sets to win 4-6, 6-1, 6-4 in just under two and a half hours.
The 22-year-old regained her composure in the final set, having initially opened up a 4-0 lead, to seal a 4-6 6-1 6-4 win and become the first Australian woman to reach the last-eight in Melbourne for 10 years.
"It doesn't get any easier, but it's just another challenge", Barty said.
"Maria was never going to go away, she's a proven champion", Barty said in her post-match press conference. She's very crafty, very good forehand and she uses her slice well, a lot of girls don't know how to deal with that.
"I feel like I came back a better person on and off the court, a better tennis player."
The drama unfolded after Australian 15th seed Barty upset the Russian five-time Grand Slam champion 4-6, 6-1, 6-4 on Rod Laver Arena.
"I felt like for me it's to stay in the moment as best that you can", said Barty, who clinched her win on her fourth match point.
Maria Sharapova vs Caroline Wozniacki; result, score, match updates and more
Unseeded American Amanda Anisimova continued her dream run, ousting 11th seed Aryna Sabalenka in straight sets 6-3, 6-2. Wozniacki, on the other hand, has been in exceptional form in the past few years.
Rashford arguably league's best striker with Kane out - Solskjaer
"I think a player and a manager with big egos clashed and the outcome was never going to be great". But the pressure is at a club like this, we want to win every single game we play'.
Marko Arnautovic AXED from West Ham squad: Is transfer to China imminent?
Last week, West Ham issued a statement prior to their Premier League game against Arsenal insisting the Austrian was not for sale. As much as we want him back fit we have got to make sure we protect the long-term'.
But, after dropping serve and then failing to convert either of two match points in the ninth game, Barty had to draw on all her trademark cool to put Sharapova away.
She added: "This is unreal".
Keeping her emotions under control was crucial in the victory over the former world number one Sharapova, as she had to come from a set down, in addition to holding her nerve to serve out the match in the third set.
It is only two years since she feared she might never play again after being stabbed in her playing hand by an intruder in her home, and four and a half years since she won her second Wimbledon title. Sharapova went on to take the set by winning five consecutive points. "I definitely had a letdown for many games straight, gave her that confidence".
However, it's a point that is worthy of discussion and increasingly her physical limitations seem to be impacting on her results.
The third set was much tighter.
Three-time Grand Slam champion Angelique Kerber suffered a stunning 6-0 6-2 defeat by unseeded American Danielle Collins in the tournament's biggest shock of the women's draw. Sharapova, screaming as loudly as she can ever have done, saved the first.