The move presents a diplomatic quandary for Barack Obama, the US president, who plans to close the facility at Guantanamo Bay, Cuba, within a year.
It also comes as Eric Holder, the US attorney general, is to visit Guantanamo
Bay next week to examine the US detention facility.
Holder said he would go to the base "to really see what is going on down at the facility, to see how people are being detained, to talk to people down there about the interrogation techniques that are being used," Reuters news agency reported.
Last October, US district judge Ricardo Urbina ordered the US government to free the 17 men into the Washington DC area, where there is a large Uighur community, many of whom have offered to serve as host families.
Urbina also strongly criticised the administration of George Bush, the former US president, for holding the men - who were not classified as enemy combatants - for an indefinite period without charge.
"I think the moment has arrived for the court to shine the light of constitutionality on the reasons for the detention," he said.
"There is a pressing need to have these people, who have been incarcerated for seven years, to have those conditions changed."
No 'legal basis'
However on Wednesday the federal appeals court overturned this ruling and rejected the argument that the Uighurs deserved to be released into the United States "after all they have endured at the hands of the US."
"Such sentiments, however high-minded, do not represent a legal basis for upsetting settled law and overriding the prerogatives of political branches," Raymond Randolph, a senior circuit court judge on the panel, wrote in the decision on Wednesday.
The US has already released four Uighurs from Guantanamo Bay in 2006, sending them to Albania because it was the only country that would take them.
On Wedneday, a Swedish immigration court granted asylum to one of the men as his sister lives in the country, the Associated Press news agency reported.