Representative Justin Amash of Michigan, the only sitting Republican member of Congress to support impeaching President Trump, announced on Thursday that he was leaving the party after facing fierce attacks from the president and fellow Republicans.

In an op-ed essay in The Washington Post that did not mention Mr. Trump by name, Mr. Amash wrote: “I’ve become disenchanted with party politics and frightened by what I see from it. The two-party system has evolved into an existential threat to American principles and institutions.”

Three hours after the essay was published, Mr. Trump responded with a personal attack against Mr. Amash, calling him “one of the dumbest and most disloyal men in Congress.”