And, like some of those in the Trump administration, Mr. Pillsbury also once considered himself a “panda hugger” — someone who thought that China could become an economic and political ally whose growth should be supported.

But Mr. Pillsbury began to take a darker view of China — and its ambitions — later in his career, after interviews and discussions with top military and intelligence officials in Beijing. And he has found a soul mate in Mr. Trump — whose relentless desire to upend America’s trade relationship with China and protect domestic power has produced a trade war that has no natural path to resolution.

Mr. Pillsbury was brought into Mr. Trump’s orbit during the transition period in 2016, after the president-elect spoke by telephone with Taiwan’s president, breaking protocol and angering China.

He has worked closely with Matthew Pottinger, the senior director of Asian affairs on the National Security Council, and the White House considered offering him a formal role, according to a former official, but there were concerns about his ability to get a security clearance. Mr. Pillsbury said that it remained a possibility and that he would like to be the ambassador to China someday.

As Mr. Trump increasingly blurs economic security and national security — viewing China’s economic rise as a national security threat to America — Mr. Pillsbury’s knowledge of China has become even more in demand.

Mr. Trump’s economic team is deeply divided on how to approach China, with nationalists like Mr. Navarro and Robert E. Lighthizer, Mr. Trump’s top trade negotiator, often clashing with Mr. Mnuchin, the Treasury secretary, and Mr. Kudlow, the director of the National Economic Council, who have offered more conciliatory approaches.

Mr. Pillsbury, whose fairly dark view of China has found resonance, tries to explain to White House officials that China’s leadership has its own internal divisions and advises Mr. Trump on how to leverage those splits to gain an advantage, he said.