The 15th seed battled back from a set and a break down to overcome the world number one 4-6 7-5 6-1 in the all-Russian fourth round match, setting up a quarter-final against China's Li Na, who upset Serb seventh seed Jelena Jankovic 6-3 7-6.
Sharapova appeared to be cruising towards a routine victory when serving for the match at 5-3 in the second set, but her opponent broke back and won the next seven games to take a commanding 4-0 lead in the deciding set.
"It's strange," Sharapova told reporters following a poor performance that was littered with 47 unforced errors, including 13 double faults.
"Serving for the match, the only unforced error I really made was a swing volley. And after that I felt a little deflated. I wasn't moving well at all.
"When I served, I missed the first ball. That obviously gives your opponent so much confidence.
"She just started swinging and wasn't making a lot of errors."
By failing to defend all her points after taking the title here last year, the 19-year-old Sharapova will lose her number one spot to Belgium's Justine Henin when the new rankings are issued next week.
HINGIS OUT
Martina Hingis, Nadia Petrova and Anna Chakvetadze were also dumped out of the tournament, leaving second seed Svetlana Kuznetsova and number six Nicole Vaidisova as the highest ranked players left in the draw.
Switzerland's Hingis, seeded three, was beaten 6-4 6-3 by 14th seed Daniela Hantuchova of Slovakia, while Petrova pulled out of her match against France's Tatiana Golovin due to a heat exhaustion.
The Russian fourth seed was trailing 6-2 1-0 when she decided she could no longer continue, while her eighth-seeded compatriot, Chakvetadze, fell 6-4 7-6 to Shahar Peer of Israel.
In a final upset of the day, Sybille Bammer of Austria upended 10th seeded Serb Ana Ivanovic 6-7 6-0 6-3.
Hantuchova, who beat Hingis in the 2002 final, said the desert heat made playing conditions tricky for all the players and upsets were always likely.
"It's very difficult to play here," she said. "In the first few days of the year I won, I was struggling here. The balls fly a lot and the court is pretty tough to play on, so I'm not surprised with these results at all."
Russia's Kuznetsova progressed with a 6-2 6-2 win over Japan's Ai Sugiyama and Czech teenager Vaidisova survived an early scare before rallying past France's Marion Bartoli 4-6 6-3 6-2.