The ruling clears the way for the Pentagon to resume trials suspended when a lower court ruled the procedures unlawful.
A three-judge panel of the United States Court of Appeals for the District of Columbia Circuit ruled unanimously on Friday against Salim Ahmed Hamdan, a Yemeni.
More broadly it said that the 1949 Geneva Convention governing prisoners of war does not apply to al-Qaida and its members.
That supports a key assertion of US President George Bush's administration, which has faced international criticism for holding hundreds of suspects at Guantanamo Bay without full prisoner of war (POW) protections.
"I think pretty much the entire opinion would be welcomed by the administration. I think there's nothing in there that is adverse to the administration's positions," Carl Tobias, a professor of law at the University of Richmond, said. "It's a very pro-administration decision."
The Pentagon has argued that it is justified in using what it calls military commissions, or tribunals, to try terror suspects, including Hamdan, who were captured in the war in Afghanistan because they are deemed enemy combatants.
Hamdan, who was captured in Afghanistan in November 2001, denies conspiring to engage in acts of terrorism and denies he was a member of al-Qaida. His lawyers say that by working as Bin Laden's driver, he simply wanted to earn enough money to return to Yemen, buy his own vehicle and support his family as a driver.
The US is criticised for keeping
prisoners at Guantanamo Bay
Two lawyers representing Hamdan, Georgetown University law professor Neal Katyal and Navy Lieutenant-Commander Charles Swift, said the appeals court ruling "is contrary to 200 years of constitutional law".
"Today's ruling places absolute trust in the president, unchecked by the constitution, statutes of Congress and long-standing treaties ratified by the Senate of the United States," the two defence lawyers said in a statement.
Katyal said in an interview that the detainee's legal team plans a further appeal.
The Pentagon had no comment on the ruling, nor did it say whether or when it planned to resume its commission proceedings against Hamdan and three other Guantanamo detainees.
Attorney General Alberto Gonzales issued a brief statement praising the decision.
"The president's authority under the laws of our nation to try enemy combatants is a vital part of the global war on terror, and today's decision reaffirms this critical authority," Gonzales said.
"By permitting trials before military commissions, the court gave the administration enough rope to hang itself"
Human Rights Watch
Kenneth Roth, executive director of Human Rights Watch, a critic of the commissions, said the Pentagon would be better off using the normal courts-martial process under the Uniform Code of Military Justice.
"By permitting trials before military commissions, the court gave the administration enough rope to hang itself," Roth said. "That's because, as currently conceived, the military commissions are deeply flawed."
One of the leading critics of the Pentagon's military commissions, the Centre for Constitutional Rights, called Friday's ruling misguided, and said it could have an impact beyond the status of Hamdan.
"The ramifications of the decision may be enormous in terms of the danger created for US soldiers stationed abroad," it said.
"If the United States does not use fair and just procedures that guarantee military detainees due process protections in the 'war on terror,' no other country will feel the need to do so either."
Swift: The court ruling is contrary
to 200 years of constitutional law
Just 15 of the 520 detainees at Guantanamo Bay have been designated by President George Bush for such prosecution by military tribunals and only four, including Hamdan, have been charged.
The Pentagon has said it is developing charges against others, and it maintains that those not charged could be held indefinitely at Guantanamo Bay.