Sentences were cut by as much as 25 years from the original prison terms ordered by a lower court in April, defence lawyers said.
The Tunisian men, ranging from late teens to 30, were among more than a dozen people who had been tried, including students, a shopkeeper and a civil servant. Three had been sentenced in absentia and did not appeal.
The group was suspected of plotting to join the Iraq's al-Qaida-linked group led by Abu Musab al-Zarqawi, and having sought training in either Syria or Iraq.
They were convicted of "belonging to an organisation operating outside the country that has adopted terrorism" and of planning to undertake military training "in order to carry out terrorist crimes in another country", the court heard on Sunday.
Tunisia has embarked on a get-
tough policy against 'terrorism'
The men denied the charges against them and told the appeals court they were tortured into confessions under police custody, said defence lawyer Samir Ben Amor. The hearing started on Saturday and went until early Sunday.
The appeals court ruled there was not enough proof to uphold the lower court's convictions, Ben Amor said.
Among the five men acquitted - Mohamed Ben Mohamed, Nizar Rayachi, Tarek Zdiri, Zyed Trabelsi and Chokri Ben Othman - several did not have passports and there was no evidence they had travelled to Syria or Iraq.
Ben Amor said the court also found there was not sufficient proof that the six others, who had travelled to Syria or Iraq, had undertaken military training for "terrorist" purposes while there.
Accusation that the men had adopted pseudonyms to protect their identities was also not proven, the lawyer said.
Among those whose sentences were reduced was Mohamed Anis Bejoya, considered the head of the group. His term was cut from 30 years to 20, Ben Amor said.
"I am not a terrorist. I ask myself why I'm here"
Another was Lofti Zine, who told the court he had been going to school in Syria when the authorities there apprehended him and tortured him during seven months in custody before extraditing him to Tunisia.
"I am not a terrorist. I ask myself why I'm here," said Zine, whose sentence was reduced from 30 years to five.
The convictions in April were the latest under a recent get-tough policy against "terrorism" in this Muslim North African nation.
A December 2003 law toughening the terms for "terrorist crimes" has led to numerous convictions in recent months.
The law is aimed at "supporting international efforts in the fight against terrorism and money laundering".
Authorities linked an April 2002 attack that killed 21 people at an ancient synagogue in the resort of Djerba to al-Qaida.