China's Xi Jinping is breaking with tradition next week on his first trip as president to the Korean peninsula, visiting Seoul before he goes to ally North Korea, in what diplomats see as a strong sign of Beijing's displeasure with Pyongyang.

Mr. Xi's July 3-4 visit, announced by the Chinese and South Korean governments Friday, will make him the first Chinese leader to visit the South before the North. The trip is likely to be well-received in Washington, which has urged Beijing to take a harder line with North Korea over...