Osaka, who withdrew from the Western & Southern Open WTA final on Saturday due to a hamstring injury, showed little sign of a fitness problem after wrapping up the first set in just over half an hour.
But the 22-year-old 2018 Open champion's composure deserted her in the second set, as a string of unforced errors crept into her game and allowed Doi to seize the initiative.
Doi raced into leads of 3-0 and 4-1 but tightened when serving for the set at 5-3 -- allowing Osaka to break back and get back on serve.
However the 29-year-old Doi regrouped to hold serve for a 6-5 lead and then punished a sloppy service game from Osaka to break once again and square the match.
Osaka raised her game noticeably in the third set, cutting down the errors and putting Doi under pressure on her service.
Two breaks helped Osaka into a 5-2 lead and she held serve to close out the win.
Osaka had walked onto court wearing a face mask emblazoned with the name of Breonna Taylor, the African-American nurse who was shot by police in her apartment in Kentucky in March.
Taylor's death has become one of the most prominent cases during the summer of nationwide protests across the United States against racism and police brutality.
Osaka says she plans to wear face masks bearing the names of other victims of racial injustice throughout the tournament.
"I have seven and it's quite sad that seven is not enough for the amount of names," Osaka said.
"Hopefully I'll get to the finals and you'll see all of them."