Mr. Mulvaney is not the only Trump appointee with a history of viewing him poorly. Nikki R. Haley, who recently announced her resignation as the United Nations ambassador, was critical of Mr. Trump during the primary campaign in 2016. And some appointees have disparaged the president while in the administration. Rex W. Tillerson, the former secretary of state, was reported to have called Mr. Trump a “moron.” The president returned the favor earlier this month by calling Mr. Tillerson “dumb as a rock.”

In a Facebook post from Oct. 11, 2016, Mr. Mulvaney said he had been canvassing his district in the days after The Washington Post first reported the “Access Hollywood” recording, in which Mr. Trump bragged about sexual assault.

“I think one thing we’ve learned about Donald Trump during this campaign is that he is not a very good person,” Mr. Mulvaney wrote. “What he said in the audiotape is disgusting and indefensible. My guess is that he has probably said even worse — and that the Clinton campaign has a lot more material to dump before this election is over.”

He went on: “I’ve decided that I don’t particularly like Donald Trump as a person. But I am still voting for him. And I am still asking other people to do the same. And there is one simple reason for that: Hillary Clinton.”

In criticizing Mrs. Clinton, Mr. Mulvaney said that she was “just as ‘deplorable’ as she makes Trump out to be.”

“She has peddled influence to make herself rich,” he said, explaining his thinking. “That sort of behavior alone used to disqualify people from office — much more so than vulgar language and vile attitudes toward women. But she has gone beyond that: She’s lied to Congress and to the American public. She has broken the law.”

While in Congress, Mr. Mulvaney was one of the most conservative and outspoken members of the House Republican caucus. His Facebook page included periodic online town halls with constituents on a range of topics.