BEIJING—The Chinese government confirmed on Saturday that Ursula Gauthier, a Beijing-based French journalist, would have to leave China because she had not apologized for an article that it said supported acts of terrorism.

Ms. Gauthier, a correspondent for the French news magazine L’Obs, told The Wall Street Journal she would not apologize and was booked on a flight leaving China shortly after midnight on Dec. 31, when her current visa expires.

If she leaves as planned, she will be the first foreign reporter effectively expelled from China since Melissa Chan, a correspondent for the English-language service of Al Jazeera, in 2012.

Ms. Gauthier has been strongly criticized by Chinese officials and state media, and subjected to threats and abuse online, for an article she wrote in November about China’s mostly Muslim northwestern region of Xinjiang.

In that article, she suggested that China was showing solidarity with France after the Nov. 13 attacks on Paris to try to win support for its own efforts to combat separatist sentiment among Xinjiang’s Uighur ethnic group.