Sharapova lost the finals of the Australian Open and Indian Wells this year to Azarenka, and the Russian had never beaten her rival from Belarus in four previous encounters in a final.
"I am really pleased to win such a tough tournament, against such tough opponents,'' said Sharapova, before collecting the white sports car donated by the sponsor. "Victoria could not perform at her best because of her injury.''
Azarenka, who fell to 29-2 this year but will keep the No. 1 spot, had her playing, right wrist taped after the first set. She was seeking her fifth title of the year.
"I am disappointed to lose, but still I had a good week,'' Azarenka said.
Sharapova, a former No. 1, won her 25th career title, an honor roll that also includes three Grand Slam titles.
Sharapova made her debut this year in Stuttgart, a tournament played on indoor clay that brought together the eight top-ranked players. Sunday was her fourth clay court title.
The Russian needed 30 minutes to roll through the first set, ending it by firing an ace with her second serve.
She broke serve for a 4-3 lead and closed out the match with a service winner. Sharapova is 22-4 for the year.
"I came here mainly to warm up for the French Open, so it's been a good week,'' she said.