President Trump used a virtual speech at the United Nations General Assembly to assail China on Tuesday, blaming Beijing for the coronavirus pandemic that has stricken the world while weighing in on global economies.

“The United Nations must hold China accountable for their actions,” Mr. Trump said. Chinese leader Xi Jinping was set to speak later on Tuesday.

Mr. Trump, facing a re-election challenge while grappling with the Covid-19 outbreak, economic strain and racial unrest, sought to blame China for not taking steps to protect other countries from the pandemic

“In the earliest days of the virus, China locked down travel domestically while allowing flights to leave China and infect the world,” Mr. Trump said. “The Chinese government, and the World Health Organization—which is virtually controlled by China—falsely declared that there was no evidence of human-to-human transmission.”

China’s state media has criticized disorganization in Western countries, including the hard-hit U.S. “The pandemic exposes a lack of leadership and unity in the international system,” the country’s state-run Xinhua news agency said in a preview of Mr. Xi’s speech.

Speaking before Mr. Trump, António Guterres, the U.N. secretary general, warned about the risk of a Cold War between the world’s two biggest economies, starting with a fight over trade and financial rules.

The tech battle between the U.S. and China has battered TikTok and Huawei and startled American companies that produce and sell in China. WSJ explains how Beijing is pouring money into high-tech chips as it wants to become self-sufficient. Video/Illustration: George Downs/The Wall Street Journal

“A technological and economic divide risks inevitably turning into a geo-strategic and military divide,” Mr. Guterres said. “We must avoid this at all costs.”

At a gathering that often seeks to address global problems, including pollution and climate change, Mr. Trump accused China, the world’s top emitter of greenhouse gases, of polluting the world.

“Those who attack America’s exceptional environmental record while ignoring China’s rampant pollution are NOT interested in the environment,” Mr. Trump said. “They only want to punish America. And I will not stand for it.”

Mr. Trump has moved to withdraw the U.S. from the Paris climate accord, which was negotiated through a U.N. framework.

Mr. Guterres delivered his remarks in person at the U.N. assembly hall in New York, but Mr. Trump and most other heads of state were set to speak via pre-recorded video statements introduced by a single country representative in the hall.

More on U.S.-China Relations

  • Where Trump and Biden Stand on China

Write to William Mauldin at william.mauldin@wsj.com