Xi Jinping's two-day visit is a chance for China to showcase its influence in the region. (File photo)

Chinese President Xi Jinping makes a historic trip to Pyongyang on Thursday, rebooting a troubled alliance as he and North Korean leader Kim Jong Un face their own challenges with US President Donald Trump.

Xi will be the first Chinese president to visit North Korea in 14 years after relations between the Cold War era allies deteriorated over Pyongyang's nuclear provocations and Beijing's subsequent backing of UN sanctions.

Xi and Kim have been working to repair ties, with the young North Korean leader visiting his older comrade four times in China in the past year and Beijing calling for sanctions to be relaxed.

But the Chinese leader waited to reciprocate the visit, biding his time to see how nuclear talks between Kim and Trump would play out before deciding to travel to Pyongyang, according to analysts.

Xi's two-day visit is a chance for China to showcase its influence in the region.

"For North Korea, the coming meeting will serve to show the US that China has its back and to send a message to Washington it should stop its maximum pressure posture," said Lim Eul-chul, professor of North Korean studies at Kyungnam University.

Negotiations between Trump and Kim have soured after a second summit in February broke up without a deal, failing to agree on what Pyongyang would be willing to give up in exchange for sanctions relief.

Beijing's own trade negotiations with Washington hit a wall last month.

Xi could come back from Pyongyang with some leverage when he meets Trump at the G20 summit in Japan next week.

'Serious Mistake'

In a rare opinion piece published in North Korea's official newspaper on Wednesday, Xi hailed the "irreplaceable" friendship of the neighbouring nations and offered a "grand plan" to bring permanent stability to East Asia.

He also vowed that Beijing would play an active role in "strengthening communication and coordination with North Korea and other relevant parties" to push forward negotiations on the Korean Peninsula.

Beijing had fretted over being sidelined after the North Korean leader agreed to meet Trump last year, with the US leader going as far as declaring he had fallen "in love" with Kim.

The editorial was a not-so-subtle reminder that Beijing remains Pyongyang's closest ally.

China sees the North as a strategic buffer from South Korea, keeping the 28,500 US troops in South Korea far from its borders.

Xi, who will be given the honour of a state visit, will pay homage at the capital's Friendship Tower, a monument to the Chinese troops who saved the North from defeat during the Korean War.

In recent days soldiers and workers have been sprucing it up.

Yongwook Ryu, professor of international relations at the National University of Singapore, said Xi could be making a "serious mistake" if he tries to use North Korea as a bargaining chip with Trump, because the US leader separates security issues from economic ones.

"If Xi can put pressure on North Korea to denuclearise i.e. offer some carrot to Trump, then he could perhaps get a concession from Trump or make a trade deal with Trump more likely," Ryu said.

Chinese foreign ministry spokesman Lu Kang has dismissed concerns that Beijing's close ties with Pyongyang could be used to put pressure on the US, saying "people with such an idea are just over-thinking."

Zhao Tong, North Korea expert at the Carnegie Tsinghua Center think tank in Beijing, said he does not expect any "substantive discussions" on denuclearisation during the meeting, because "China and North Korea do not have enough mutual trust."