President Trump's decision came "to the regret of almost all," the government’s authoritative news agency, Xinhua, said Friday in a commentary. The commentary said Mr. Trump was effectively cutting the U.S. loose from a "historic global agreement that the country once played a key role in making." In 2015, joint efforts by China and the U.S. were widely credited with helping gather enough global momentum to cement the agreement.

The Global Times, a nationalist tabloid, declared on its verified Weibo account that Mr. Trump's decision had made him the "Western world's public enemy." A commentary on the government’s news site China.org.cn raised the prospect of a new era of U.S. isolationism, observing that the country is “withdrawing from its global duties.”

On social media, Chinese chewed over the U.S. decision, with the hashtag #TrumpQuitstheParisAccords drawing 8.8 million views by Friday afternoon. Many were fiercely critical of Mr. Trump's move, with some joking that skies in the U.S. would soon experience the kind of air pollution familiar to Chinese citizens. Others suggested that it handed China a rare opening.

"It's that phenomenon of your enemy retreating and us advancing. We'll once again be regarded well. China will advance its position on the global stage!" wrote a Beijing-based economic commentator on his verified Weibo account.

“In January it was TPP,” wrote another verified user, referring to the Trans-Pacific Partnership. “In June it was the Paris agreement. Let's guess what's next: The United Nations?"

In his remarks Thursday, Mr. Trump said the Paris agreement would hurt the U.S. economy and American workers, as well as weaken U.S. sovereignty and "put us at a permanent disadvantage to the other countries of the world." He also criticized the accord for what he described as a failure to put meaningful pressure on nations such as China.

Overall, the prevailing mood in China mixed disappointment, scorn and schadenfreude. Some Chinese said the move only served to diminish the U.S., and won’t in Mr. Trump’s words “make America great again.”

Others said Mr. Trump's move was simply pragmatic. "Such an action is really characteristic of Trump," state broadcaster CCTV quoted commentator Su Xiaohui, an international affairs expert, as saying on its WeChat social media account. "His way of thinking is informed by his business experience. For him, to withdraw from the agreement is a decision about money."