Xi made the plea in a phone call hours after Trump ramped up his warnings to Pyongyang, saying it would "truly regret" taking hostile action against the United States.
China's foreign ministry said Xi urged Trump to avoid "words and deeds" that would "exacerbate" the already-tense situation, exercise restraint, and seek a political settlement.
Al Jazeera's Adrian Brown, reporting from Beijing, said the message from Xi to Trump was made clear in the "short, but polite" telephone call.
"This was a chance for the Chinese president to show to his people that he is trying to take the lead in trying to resolve this crisis," he said.
North Korea said it would complete plans by mid-August to fire four intermediate-range missiles over Japan to land near the US Pacific island territory of Guam, after Trump said any threats by Pyongyang would be "met with fire and fury like the world has never seen".
Brown said China wants to avoid regime change in North Korea because it fears anarchy and a refugee influx. "President Xi doesn't always, I think, believe that the US understands the difficult situation it is in and he feels that the US in some ways has been arm twisting China for the past couple of weeks."
Both leaders also pressed Pyongyang to halt its own threats.
"President Trump and President Xi agreed North Korea must stop its provocative and escalatory behavior. The presidents also reiterated their mutual commitment to denuclearization of the Korean peninsula," a White House statement said.
The North's official KCNA news service in an editorial blamed Trump for "driving the situation on the Korean peninsula to the brink of a nuclear war", calling the US "the heinous nuclear war fanatic".
Japanese media said Tokyo was deploying its Patriot missile defense system.
The defense ministry deployed the Patriot Advanced Capability-3 (PAC-3) system in Shimane, Hiroshima, and Kochi in western Japan, which North Korea had warned could be along its missiles' flight path, public broadcaster NHK and Kyodo News said.
It also deployed the anti-missile system in neighboring Ehime, according to the reports, while the Asahi Shimbun said one maritime Self-Defense Force Aegis destroyer was stationed in the East Sea to shoot down airborne missiles.
Television footage showed military vehicles carrying launchers and other equipment for the surface-to-air system entering a Japanese base in Kochi before dawn.
US military forces "stand ready" to safeguard Guam after North Korea threatened to fire ballistic missiles towards the American Pacific island territory, the White House said early Saturday.
During a call with Guam Governor Eddie Calvo, Trump "reassured" him the "United States forces stand ready to ensure the safety and security of the people of Guam, along with the rest of America," a statement said.
Guam's government, meanwhile, issued fliers with emergency tips on what to do in case of a North Korean strike.
If an attack warning is issued, Guam residents should take cover quickly - in a concrete structure, preferably underground - and stay there until instructed otherwise, according to a fact sheet titled "Preparing for an Imminent Missile Threat."