The president has come to believe that Mr. Kelly is hiding things from him, in the view of people who work in the White House and insist on anonymity to describe private conversations. He has complained that Mr. Kelly has not been forthcoming about the pasts of some staff members, who either opposed him during the 2016 presidential primaries or had connections to the Bush family. And he has taken to venting about Mr. Kelly to an array of friends and supporters, while expressing confidence that recent successes — such as the continued strength of the economy and progress toward nuclear disarmament talks with North Korea — are proof that he is his own best adviser.

Mr. Kelly complains aloud about Mr. Trump, telling colleagues, “I don’t need this” after dressing-downs from the president.

While several current and former officials said they had not heard the chief of staff call his boss “an idiot,” as NBC News reported on Monday, many said that Mr. Kelly had given the impression over many months that he did not hold the president in high regard. He speaks as if he sees himself as the lone bulwark against potentially dangerous decisions by the commander in chief, they say. And whether he used the word or not, they added, the story itself could serve to accelerate his departure.