Former world number one Osaka advanced to the semi-finals with a 5-7 6-3 6-4 victory in just over two hours in Beijing.
Japan’s Osaka, 21, will face defending champion Caroline Wozniacki in the last four.
Top seed Ashleigh Barty will take on Kiki Bertens in the other semi-final.
Teenager andreescu charged into a 5-1 lead in the first set, but Osaka fought back to draw level on 5-5.
The 19-year-old Canadian then broke Osaka’s serve to clinch the first set.
World number six Andreescu went up 3-1 in the second set before Osaka won five consecutive games to level the match and the australian open champion proved too strong in the third set of what was the first meeting between the pair.
“I forgot how it felt and honestly it sucks, I didn’t miss it,” Andreescu said after her first loss since the miami Open in March in a run that included her stunning victory over serena williams in the US Open final last month.
Osaka became the fifth player to qualify for the season-ending WTA Finals in Shenzhen, China after Barty, Karolina Pliskova, Wimbledon champion simona halep and Andreescu.
australia’s world number one Barty also battled from a set down to beat czech republic’s seventh seed Petra Kvitova 4-6 6-4 6-3 on Friday to set up her meeting with eighth seed Bertens, who upset third seed Elina Svitolina 7-6 (8-6) 6-2.
Dane Wozniacki beat Russia’s Daria Kasatkina 6-3 7-6 (7-5).