BEIJING — China’s president, Xi Jinping, met with a senior envoy from North Korea here on Wednesday, in what appeared to be a slight thaw in a bilateral relationship that has been strained by Beijing’s concerns about the North’s nuclear weapons program.

Mr. Xi greeted the envoy, Ri Su-yong, the day after North Korea tried unsuccessfully to fire an intermediate-range ballistic missile. Their encounter also followed the news that Mr. Ri had brought to China a stern message insisting that the North would not stop trying developing nuclear arms.

Mr. Ri, a former foreign minister and a confidant of the North Korean leader, Kim Jong-un, told Chinese Communist Party officials on Tuesday that his country would continue to expand its nuclear arsenal and had no intention of giving up the weapons, the state-run Central News Agency in North Korea reported.

In the meeting with Mr. Ri, Mr. Xi seemed to strike a positive tone, telling him that China “attached great importance to developing a friendly relationship with North Korea” and was seeking “calm” on the Korean Peninsula, China’s state-owned news agency, Xinhua, said Wednesday evening.