President Donald Trump’s “constant fear-mongering’’ about terrorism is “irresponsible and dangerous.’’ He needs to “stop attacking the legitimacy of the judiciary.’’ He picked an attorney general with “anti-liberty” positions on surveillance and police seizure of property.

Those tough assessments come not from one of the president’s critics in the Democratic Party, but from a conservative Republican House member whose district decisively backed Mr. Trump in the election.

Rep. Justin Amash of Michigan has emerged as one of the leading Republican critics of the president, using a tool Mr. Trump himself often employs—an assertive presence on Twitter —to challenge and even taunt the president. While other House Republicans who were skeptical of Mr. Trump during the presidential campaign have since toned down their criticism, Mr. Amash, who has 100,000 Twitter followers, has remained a vocal critic.

Mr. Amash says his opposition is based on principle, as a libertarian concerned about government overreach and adherence to the Constitution. While many Republican lawmakers hold similar beliefs, Mr. Amash has been an especially outspoken proponent of smaller government, even on issues—such as reducing surveillance—where his views put him out of step with the more mainstream elements of the GOP.

“To me, it doesn’t matter whether it’s a Republican in the White House or a Democrat in the White House. I have a duty to defend liberty, defend the rule of law and protect the rights of all of my constituents,” said Mr. Amash.