In a 3-0 ruling, the appeals court said that material support for terrorism was not an international-law war crime at the time Hamdan engaged in the activity for which he was convicted.
Hamdan was sentenced to 5 1/2 years, but with credit for time served is back home in Yemen, reportedly working as a taxi driver.
"If the government wanted to charge Hamdan with aiding and abetting terrorism or some other war crime that was sufficiently rooted in the international law of war at the time of Hamdan's conduct, it should have done so," wrote Judge Brett Kavanaugh of the U.S. Circuit Court of Appeals for the District of Columbia.
The war crime for which Hamdan was convicted was specified in the Military Commissions Act of 2006.
"The government suggests that at the time of Hamdan's conduct from 1996 to 2001, material support for terrorism violated the law of war referenced" in U.S. law, said Kavanaugh, but "we conclude otherwise."
To date, the cases against seven Guantánamo Bay prisoners under the military commission system in place at the military base in Cuba have involved material support for terrorism. In five cases, those charged pleaded guilty. Hamdan went to trial, as did Ali Hamza al-Bahlul, who helped al-Qaida produce propaganda and handled media relations for bin Laden. Al-Bahlul was convicted in November 2008 of multiple counts of conspiracy, solicitation to commit murder and providing material support for terrorism, and is serving a life sentence at Guantánamo.
"It is highly likely that the result of this decision in Hamdan will be to vacate the convictions of Bahlul," said Hofstra University constitutional law professor Eric M. Freedman. "Even the conspiracy and solicitation to commit murder counts are very probably headed toward reversal." Justice Department spokesman Dean Boyd said the department is reviewing the ruling.
In 2006, Hamdan's lawyers successfully challenged the system of military commissions set up by President George W. Bush. That resulted in congressional enactment of the Military Commissions Act under which Hamdan was eventually tried.
A six-member military jury in 2008 cleared Hamdan of conspiracy while finding him guilty of material support for terrorism.
The Center for Constitutional Rights praised yesterday's decision but said it does not go far enough.The center says detainees at Guantánamo Bay are civilians under the laws of war and must be charged under domestic laws or released, rather than being tried under a system of military commissions.