Insufficient evidence to prove that they were pirates was the reason behind the ruling.
The three men were arrested alongside 23 more suspected pirates off the Horn of Africa, in January 2012.
Two of the three acquitted men were appealing against their 21-year sentence and the third, a 16-year-old, had received a sentence of 14 years.
According to reports at the time, the Danish navy freed 14 Iranian and Pakistan hostages who were being held hostage on the ship on which the 25 Somali men were captured.
Local