Dementieva will meet 16th-seeded Jelena Jankovic of Serbia and Montenegro, a 6-4, 6-3 upset winner over Serena Williams.
Williams, unseeded and playing her third tournament of the year after a knee injury knocked her out for six months, is projected to rise to a ranking between No. 75 and 80 from her current 110.
Sharapova hadn't lost so much as a set during her streak, which included the Acura Classic title last week in Carlsbad. But she did little right against Dementieva, the No. 3 seed who reached the final here for the first time in five tries.
Williams appeared tired in the second set against Jankovic, who reached her first final this year. She won one match in her first 10 tournaments before going 24-9 in her last 10, including Carson.
Williams carried some extra motivation against Jankovic, who took out her older sister, Venus, in the fourth round at Wimbledon, when Venus accused Jankovic of serving before she was ready.
Indeed, there appeared to be some gamesmanship between Serena and Jankovic.
During a changeover early in the second set, Jankovic flicked a ball on the other side of the net and it hit Williams, who turned sharply and stared at her opponent.
Williams asked the chair umpire to tell Jankovic to stop hitting balls at her "because it almost hit me in the eye."
At the end of the match, Williams let Jankovic know she had been hit.
Later in the set, Williams drilled an overhead smash down the middle of the court. Jankovic ducked as it sailed over her.
Jankovic used a strong backhand to beat Williams from the backcourt. She didn't flinch at Williams' power and used clever drop shots to move her out of position.
Williams received a warning for racket abuse after losing the first set. She quickly fell behind 5-1 in the second, giving actress Sharon Stone and Williams' family little to cheer.
Jankovic served out the match at love on four consecutive errors by Williams, including dumping a smash into the net on match point, according to the AP.
Sharapova brought momentum from her recent victories and a dominating 5-1 career record against Dementieva, including wins this year at Indian Wells and Wimbledon.
But she was clearly off her game from the start, quickly falling into a 5-1 hole in the first set.
She broke Dementieva and rattled off four games in a row to tie the set at 5-all with a stinging forehand. Sharapova challenged an out call trailing 5-3, 40-30 on Dementieva's serve. Her challenge was ruled good by the electronic line-calling system - one of the few things that went Sharapova's way.
But Dementieva held and then broke Sharapova at love with a forehand winner in the corner to wrap up the set.
Dementieva built a 3-0 lead in the second. Sharapova held at love and then broke Dementieva to get to 3-2 before Dementieva closed out the final three games.
Sharapova battled on her serve in the final game, which was marked by extended rallies before Dementieva won on her seventh match point. Twice, Sharapova had the advantage, but she committed errors both times.
She finally sent a backhand past the baseline as Dementieva squealed with delight and smiled at her boyfriend, Buffalo Sabres forward Maxim Afinogenov.
Later Saturday, Sharapova became the latest top player to withdraw from next week's tournament in Montreal - which would have been her final tuneup for the U.S. Open, the AP reports.