The message comes amid concerns that the Trump-supporting extremists who raided the Capitol to stop the certification of Joe Biden as the next president, have supporters in the armed forces and law enforcement.
The US military's Joint Chiefs of Staff, the uniformed leaders of the different military branches, put out an extraordinary message to service members saying the violent riots last week were an assault on America's constitutional process and against the law.
"The violent riot... was as direct assault on the US Congress, the Capitol building, and our Constitutional process," said a memorandum signed by all eight members of the Joint Chiefs of Staff, led by the chairman, General Mark Milley.
The joint message broke nearly a week of silence by the military leaders after the assault on the Capitol by supporters of President Donald Trump sent lawmakers into hiding and left five people dead.
"The rights of freedom of speech and assembly do not give anyone the right to resort to violence, sedition and insurrection," they said.
US officials said Milley had not commented on last week's events because he wanted to stay out of politics.
The silence was in sharp contrast to June, when Milley made a controversial walk to a church with Trump after law enforcement officers backed by National Guard troops used tear-inducing chemicals and rubber bullets to clear the area of peaceful protesters.
The letter said members of the armed services are bound to defend the constitution.
"Any act to disrupt the constitutional process is not only against our traditions, values and oath; it is against the law."
Underscoring the point, the Joint Chiefs said that, "in accordance with the Constitution," Biden would be inaugurated on January 20th "and will become our 46th commander in chief."
"We don't tolerate extremists in our ranks"
Pentagon officials were asked Monday about the possibility of pro-Trump activists in the Guard and among regular troops.
"We don't tolerate extremists in our ranks," said spokesman Jonathan Hoffman.
Some service members have privately expressed concern that senior leaders did not provide direction in the aftermath of the attack on American democracy on Wednesday.
There has also been a renewed focus on extremism within the US military after the Capitol storming, with a large proportion of service members being white and male.
The Army told Reuters on Tuesday that it was working with the FBI to see if any attackers were current service members and with the Secret Service to see if any of the nearly 10,000 National Guard troops securing Biden's inauguration would need additional screening.
The Pentagon is deploying as many as 15,000 National Guard troops to protect Biden's inauguration on January 20, amid fears of new violence.