The ACLU claims the ban, which Mr Trump first announced via Twitter, is unconstitutional and "based on uninformed speculation, myths and stereotypes, and a desire to harm transgender people".
“Men and women who are transgender with the courage and capacity to serve deserve more from their commander-in-chief," ACLU attorney Joshua Block said in a statement.
Mr Trump's tweets sparked outcry and confusion last month, as it seemed the Pentagon had not been briefed on the decision. The announcement appeared to roll back an Obama-era decision that allowed current transgender service members to serve openly, and permitted new transgender recruits to enlist.
Mr Trump codified his decision last week, directing the Pentagon to bar all transgender individuals from joining the military indefinitely. White House officials would not say whether those currently enlisted could continue to serve.
Now, the ACLU has filed a suit claiming that the policy discriminates based on sex and transgender status, and violates constitutional rights to equal protection and substantive due process.
The suit is one of two legal complaints filed against Mr Trump's ban. The Lambda Legal and OutServe-Service Members Legal Defense Network also filed suit on Monday, claiming the ban is "unsupported by any compelling, important, or even rational justification".
Mr Trump has claimed transgender service must be banned due to the "tremendous medical costs and disruption" that it would entail. A 2016 study commissioned by the Department of Defence, however, found that allowing transgender troops to serve openly would have “little to no impact” on military readiness, and would increase health care expenditures by less than half a per cent.
“Each and every claim made by the President Trump to justify this ban can be easily debunked by the conclusions drawn from the Department of Defense’s own review process," Mr Block said.
The ACLU filed suit on behalf of five transgender members of the military. One of the members served in the US military for nine years, including a tour in Afghanistan, according to the ACLU. Another was previously named "Airman of the Year". Lamnda Legal is representing one transgender person currently serving in the military and two who want to enlist.
It is estimated that more than 15,000 transgender people are actively serving in the US military. Another 134,000 are veterans.
“We promised that we would sue if the president took this action," said Peter Perkowski, Legal Director for OutServe-SLDN. "...We are on the side of every single transgender service member and those who want to serve."
He added: "The nation’s courts exist to protect the people whom tyrants would otherwise abuse. Trump can’t tweet his way out of this one.”
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies