Despite the decision, authorities have decided Abdelghani Mzoudi remains a threat and will be expelled from Germany within two weeks.
In 2003, Mr Mzoudi became only the second person anywhere in the world to be tried over the suicide plane attacks.
The prosecution case — that he helped Hamburg-based Mohamed Atta, Marwan al-Shehhi and Ziad Jarrah plan their attacks on the World Trade Centre and the Pentagon — collapsed, and he was found not guilty.
The acquittal has now been upheld, but German security officials say Mr Mzoudi will be expelled within the next two weeks.
The presiding Appeals Court judge Klaus Tolksdorf said his panel found no legal errors in the original court verdict.
“We are aware that our decision will not find general acceptance – thousands of innocent people lost their lives in the September 11 attacks,” he told the court.
“But even in the case of appalling acts, a court is bound by the law. A constitutional state cannot defend itself with means that would force it to give up its standards.”
Attorney Sven Leistikow, who represented American relatives of September the 11th victims, said his clients were disappointed by the ruling.
The original trial heard how Mr Mzoudi trained at the same al-Qaeda camps as the hijackers and was close friends with them in Hamburg.
But the prosecution failed to prove he knew anything about their plot.
At the time the judges described him as a “fringe figure” and said he was being freed because there was insufficient proof against him, not because the court was convinced of his innocence.
Moroccan authorities have said they have no warrants for Mr Mzoudi, and US officials have refused to comment on whether they are interested in him.
In 2003 his friend Mounir el Motassadeq was convicted of identical charges and sentenced to the maximum 15 years in prison.
The same panel that heard Mr Mzoudi’s case overturned el Motassadeq’s conviction last year and ordered a retrial, ruling he’d been unfairly denied testimony from al-Qaeda captives in US custody.
A verdict in the el Motassadeq case is expected in August.