Patricia Espinosa, the head of the United Nations climate change agency in Bonn, Germany, said her office had heard from Chile’s government shortly before the announcement from the presidential palace in Santiago. “We are currently exploring alternative hosting options,” she said in a statement.

Her office said this was the first time in the quarter-century of United Nations-sponsored climate negotiations that a host country had canceled so close to the event. The office was weighing whether the meeting could be held elsewhere in December or whether it would have to be postponed until January.

For Mr. Trump and Mr. Xi, the meeting of the Asia-Pacific Economic Cooperation group was an opportunity to settle a monthslong fight over tariffs that has rippled across the global economy.

The forum was considered a likely setting for Mr. Trump to sign an interim trade deal with China that would lower some of the tensions in a trade war that has battered stock markets and companies around the world. The trade deal, which is still being finalized, would prevent future tariff increases and lock in intellectual property protections in China, as well as ensure Chinese purchases of American agriculture.

“As you know, we’re going to be in Chile together for a big summit,” Mr. Trump said on Oct. 11, about signing the accord. “And maybe it’ll be then, or maybe it’ll be sometime around then.”

Chile’s cancellation could delay that signing while the leaders look for another venue to meet.

A White House spokesman, Hogan Gidley, said in a statement that the administration intended to finalize “Phase One of the historic trade deal with China within the same time frame.”

The turmoil in Chile, which began Oct. 18, with protests over a modest hike in the Santiago subway fare, has spiraled into violent clashes between security forces and demonstrators. Looting and arson soon spread across the capital, prompting Mr. Piñera to declare a state of emergency and ask the armed forces to restore order.