Five-time Grand Slam winner Sharapova, 30, was up a set and a break but squandered it to lose 3-6 7-5 6-4.
Mladenovic, 23, faces German Laura Siegemund in Sunday’s final.
Having been given a wildcard entry, Russian Sharapova needed to reach the final in Germany to be eligible for qualifying for the French Open.
Her defeat means she will be outside the top 200 when the rankings are released on Monday, so she will need a wildcard to compete in qualifying or the main draw in the event in Paris, which starts on 28 May.
She will learn on 16 May whether she will be given a wildcard for either stage at Roland Garros.
Mladenovic holds her nerve
She broke Mladenovic again at the start of the second set and looked to be cruising to victory, but despite conceding 11 double faults, the Frenchwoman improved her baseline game and fought her way back into the contest.
The world number 19 broke back and then held her composure to survive three break points to go 6-5 ahead before converting her first set point on Sharapova’s next service game.
The pair traded blows early in the third before Mladenovic grabbed a break to go 4-2 up and fought back from 0-40 to hold her serve.
Sharapova rallied to pull it back to 5-4, but Mladenovic was not to be denied her first win over the Russian and converted her first match point.