China’s Foreign Ministry would not confirm the former spymaster’s presence in Beijing, even though video footage showed him at the airport after his arrival from Pyongyang.

In recent weeks, China and the United States have been vying for the attention of Kim Jong-un, with Mr. Trump accusing China of contributing to a toughened North Korean stance on denuclearization after the North Korean and Chinese leaders met this month.

If the former spy chief met with senior Chinese officials in Beijing, he might risk angering Mr. Trump again, diplomats said. His stop in Beijing could also be related to his presence on a sanctions list that bars him from entering the United States.

An American diplomat said a waiver would have to be granted for such an individual to enter the United States, although it was likely one would automatically be given under extraordinary circumstances like these.

Mr. Kim was probably headed to New York, where North Korea has a mission to the United Nations, rather than to Washington because it was easier for him to get a visa there, another American diplomat said. North Korean diplomats and officials are not allowed to travel more than a few miles outside New York City.

Kim Yong-chol has already met Mr. Pompeo twice in Pyongyang. On the second visit, Mr. Pompeo expected to come away with a set of details for the Singapore summit meeting relating to the denuclearization of the North, but failed to do so. After the second meeting this month, Mr. Pompeo returned to Washington with three Americans who had been detained in North Korea.

In his most recent meeting with Mr. Pompeo, Mr. Kim struck a defiant tone, saying at a luncheon that North Korea’s willingness to enter into talks was “not a result of sanctions that have been imposed from the outside.” But he reminded the visiting Americans that North Korea intended to focus “all efforts into economic progress in our country.”