Xi made his comments to visiting South Korean President Moon Jae-in just days after U.S. Secretary of State Rex Tillerson offered to begin direct talks with North Korea without pre-conditions.
But the White House said on Wednesday that no negotiations could be held with North Korea until it improved its behaviour. The White House has declined to say whether President Donald Trump, who has taken a tougher rhetorical line toward North Korea, approved Tillerson's overture.
Russian President Vladimir Putin said Tillerson's offer of direct contacts with North Korea was "a very good signal", while warning that a U.S. strike on the North would have catastrophic consequences.
North Korea tested its most advanced intercontinental ballistic missile on Nov. 29, which it said could put all of the United States within range, in defiance of international pressure and U.N. sanctions.
While South Korea and China share the goal of getting North Korea to give up its nuclear weapons and stop testing increasingly sophisticated long-range missiles, the two have not seen eye-to-eye on how to achieve this.
Meeting in Beijing's Great Hall of the People, Xi told Moon that the goal of denuclearising the Korean peninsula must be stuck to, and that war and chaos cannot be allowed to happen, state media said.
"The peninsula issue must in the end be resolved via dialogue and consultation," Xi was cited as saying.
China and South Korea have an important shared interest in maintaining peace and stability, and China is willing to work with South Korea to prevent war and promote talks, Xi added.
China would support North and South Korea to improve relations as this was good for easing tension, he said.
Xi's warm tone followed nearly a year of tense relations between the two countries.
China has been furious about the deployment of the U.S.-made Terminal High Altitude Area Defence (THAAD) anti-missile system in South Korea, saying its powerful radar can see far into China and will do nothing to ease tension with North Korea.
China and South Korea agreed in late October that they would normalise exchanges and move past the dispute over THAAD, which froze trade and business exchanges, and Moon has been keen to put the dispute behind them.
Xi reiterated China's position on THAAD and said he hoped South Korea would continue to "appropriately handle" the issue.
Guterres, speaking to reporters in Tokyo after meeting Japanese Prime Minister Shinzo Abe, said Security Council resolutions on North Korea's nuclear and missile programmes must be fully implemented by Pyongyang and other countries.
"It is very clear that the Security Council resolutions must be fully implemented, first of all by North Korea, but by all other countries whose role is crucial to ... achieve the result we all aim at, which is the denuclearisation of the Korean peninsula," Guterres said.
He added that Security Council unity was also vital "to allow for the possibility of diplomatic engagement" that would allow denuclearisation to take place.
"The worst possible thing that could happen is for us all to sleepwalk into a war that might have very dramatic circumstances," Guterres said.
He said he expected a meeting of the U.N. Security Council on Friday would deliver a strong expression of unity and the need for diplomacy to resolve the issue.
Japan says now is the time to keep up maximum pressure on North Korea, not start talks on its missile and nuclear programmes.
China and Russia, however, have welcomed Tillerson's overture.
Russian President Vladimir Putin said a strike on North Korea by the United States would have catastrophic consequences and that he hoped to work with Washington eventually to resolve the crisis on the Korean peninsula.
Russia does not accept North Korea's nuclear status, Putin told an annual news conference. But he also said that some of Washington's past actions had provoked North Korea into violating a 2005 pact to curb its nuclear programme.
"We believe the two sides should now stop aggravating the situation," Putin said.
North Korea justifies its weapons programmes as necessary defence against U.S. plans to invade. The United States, which has 28,500 troops in South Korea, a legacy of the 1950-53 Korean war, denies any such intention.
(Additional reporting by Linda Sieg in TOKYO,; Denis Pinchuk in MOSCOW and Christine Kim in SEOUL; Writing by Robert Birsel; Editing by Clarence Fernandez)
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)