"When we swear an oath to support and defend the Constitution, which is a document and a set of principles and it supports the rule of law, one of those is to ensure that we do not obey illegal orders," Allen told told ABC’s George Stephanopoulos on "This Week."
In the past, Trump has supported the use of waterboarding and other enhanced interrogation techniques, and has said the military should kill the families of alleged terrorists.
"He's talked about needing to torture. He's talked about needing to murder the families of alleged terrorists," Allen said. "He's talked about carpet-bombing ISIL. Who do you think is going to carpet-bombed when all that occurs? It's going to be innocent families."
Were Trump to order such things, Allen said, he would be ordering illegal actions.
"What we need to do is ensure that we don't create an environment that puts us on a track conceivably where the United States military finds itself in a civil military crisis with a commander in chief who would have us do illegal things,” Allen said.
Allen's full-throated endorsement of Clinton came in a speech Thursday night when he spoke flanked by more than 35 veterans.
In his speech, Allen slammed the Republican nominee without naming him: “With [Clinton] as our commander-in-chief, our international relations will not be reduced to a business transaction.”
Allen, a four-star general who served as commander of U.S. forces in Afghanistan, recently served as the U.S. special presidential envoy for the international coalition fighting ISIS.
Trump added more generally about the U.S. military effort against ISIS that “the generals aren’t doing so well right now,” but added that may be “Obama’s fault.”
“If you look at ISIS -- General McArthur and General Patton, they're spinning in their graves. The generals certainly aren't doing very well right now,” he said.
Allen said Trump's comments about the military are a "direct insult" to men and women currently serving in the armed forces.
"What we do have to do, George, is listen to what he's been saying about our military," Allen said. "He's called it a disaster. He says our military can't win anymore. That's a direct insult to every single man and woman who's wearing the uniform today."
Beyond Trump, Allen has also faced criticism from within the military community for endorsing any political candidate. Retired Gen. Martin Dempsey, former chairman of the joint chiefs of staff, wrote a letter to the Washington Post criticizing Allen -- as well as retired Lt. General Michael Flynn who spoke in support of Trump at the Republican National Convention -- for breaking the military's tradition of remaining apolitical.
"They have just made the task of their successors who continue to serve in uniform and are accountable for our security, more complicated. It was a mistake for them to participate as they did. It was a mistake for our presidential candidates to ask them to do so," wrote Dempsey in the letter published today.
Allen said he respected Dempsey, but felt compelled to speak out.
"Marty Dempsey is one of the greatest soldiers I have ever known and a dear friend," Allen said. "And I understand completely what he is saying," said Allen.
"But I've agonized over this decision over and over again, George ... I wanted to make sure it was very clear that I supported this particular candidate, Hillary Clinton, to be the president and the commander-in-chief and I decried these comments that put us on a potential track for a civil military crisis the like of which we have never seen in this country, that was the reason I came off the bench."
Allen added that he did not plan to campaign for Clinton or engage in other political activities.