Asked whether he minded Mr. Kelly telling lawmakers he had not been fully informed about immigration, Mr. Trump said: “No, he did not say that. He didn’t say it the way you would like him to say it.”

But according to one person familiar with the president’s thinking, Mr. Trump was livid when he learned that Mr. Kelly had described him as “evolving” in his immigration position. Throughout the evening on Wednesday, Mr. Trump fielded calls from allies who described Mr. Kelly’s comments to Congress as undermining the president, stoking Mr. Trump’s fury.

The president — who never likes it when someone characterizes his thinking — vented his anger to Mr. Kelly and to allies, according to the person familiar with the president’s thinking. It was similar to a moment during the campaign in April of 2016, when Paul Manafort — who had just been hired to the Trump campaign — was caught on tape at a meeting with Republican National Committee members saying of Mr. Trump, “the part he’s been playing is evolving.”

When a president’s chief of staff speaks to members of Congress, it should be a “consistent message,” Representative Henry Cuellar, a Democrat of Texas, said on Thursday in an interview with CNN. Mr. Cuellar, who attended Wednesday’s meeting with Mr. Kelly, said the inconsistency “makes it hard” to negotiate.

Lawmakers who attended the meeting on Wednesday described Mr. Kelly’s remarks. Representative Luis V. Gutiérrez, a Democrat of Illinois who was at the meeting, said Mr. Kelly told the group that “a 50-foot wall from sea to shining sea isn’t what we’re going to build.”

Mr. Gutiérrez told reporters that Mr. Kelly referenced Mr. Trump’s campaign promises to build a wall and said, “There were statements made about the wall that were not informed statements.”

In an interview with Fox News on Wednesday night, Mr. Kelly defended his comments to the Democratic lawmakers and said, “There’s been an evolutionary process that this president has gone through, as a campaign, and I pointed out to all of the members that were in the room that they all say things during the course of campaigns that may or may not be fully informed.”