That skill was on display in mid-May, when Mr. Trump tweeted that he was going to find a way to help put back in business a Chinese telecommunications company that had been punished for violating American sanctions on Iran and North Korea. The decision blindsided administration officials and lawmakers, including Democrats who publicly criticized Mr. Trump’s decision and said the president was caving to China.

Mr. Mnuchin, along with the commerce secretary, Wilbur Ross, was dispatched to Capitol Hill to try to calm angry Republican lawmakers and explain the rationale behind allowing the company, ZTE, to remain in business. Several of the lawmakers appeared unconvinced and, according to a person who was in the meeting, Mr. Mnuchin advised them to take their concerns directly to the president.

He has also learned when to fight and when to toe the president’s line. While colleagues describe Mr. Mnuchin as someone who believes in free markets and views trade barriers as a last resort, those close to the secretary say he has learned to appreciate Mr. Trump’s use of the threat of tariffs as a negotiating tool.

In talks with China, he has been focused on the president’s desire to see the bilateral trade deficit reduced, rather than emphasizing some of the other trade barriers that many lawmakers and executives say put American companies at a disadvantage.

Stephen K. Bannon, Mr. Trump’s former top strategist, has said that Mr. Mnuchin is in over his head in the negotiations and that he is letting Mr. Trump’s leverage slip away by failing to force China to make major changes to its industrial policy.

David Loevinger, the Treasury Department’s senior coordinator for China from 2009 to 2012, said it was apparent that the Chinese government was trying to elevate Mr. Mnuchin’s role in the negotiations because they see him as the American official most likely to cut a deal.

“Among the possible choices, they see Mnuchin as being less hawkish than some of the other counterparts,” Mr. Loevinger said.