Osaka lost the first set 1-6, but gained strength and confidence as the match continued, winning the next two sets, 6-3, 6-3.
In staging her comeback, Osaka, 22, became the first U.S. Open women's finalist since 1994 to lose the opening set and win the title. In that year, Arantxa Sanchez Vicario defeated defending champion Steffi Graf in the final, 1-6, 7-6(7-3), 6-4.
The tournament has been held without fans because of the coronavirus pandemic. The players' support teams, tournament officials, employees and volunteers were seated among the thousands of empty seats.
"I didn't want to lose this thing in less than an hour," a somewhat shy Osaka said at the awards ceremony, referring to her lackluster start and her spirited recovery. She had dropped the first set in 27 minutes.
For her victory, Osaka, who is from Japan but lives in Los Angeles, earned $3 million. Azarenka, 31, a native of Belarus who also lives in California, received $1.5 million.
"It was a really hard match for me," Osaka said, noting that she had watched Azarenka play at the U.S. Open "when I was younger."
Azarenka was a world No. 1 in singles in 2012 and has won 21 World Tennis Association singles titles. She also competed in the 2012 Olympic Games.
During the U.S. Open, Osaka wore masks before and after each of her matches that have displayed the names of Black people killed or injured by police.
Osaka said that when she arrived at the tournament, she brought seven masks with her -- one for each round of the Grand Slam. She wore the masks when she arrived at the court, but removed them when she played.
On Saturday, she said she could not assess the impact her gesture made, largely because she and fellow tennis players were shielded from the outside world by a "bubble" created to protect them from COVID-19.
"I hope it made people start talking," she said at the awards ceremony.