The unnamed man, a Tamil who had fought with the Tamil Tigers against the Sri Lankan government, requested asylum in Switzerland in 2009, telling the Swiss authorities he had been persecuted in his own country.
The request was rejected and, following an unsuccessful appeal, the man, his wife and children were deported in 2013.
On arrival at Colombo airport they were stopped and questioned, before the man was taken into custody where he was beaten and ill-treated.
He was visited by a representative of the Swiss ambassador who said the man was too frightened to speak freely, found the court.
After that visit the man's wife and children returned to live in Switzerland.
He was finally released in 2015 and requested a Swiss visa on humanitarian grounds, which was accepted by the Swiss migration office.
In its judgement on Thursday the ECHR decided that Switzerland must have been aware that the man risked persecution when it deported him to Sri Lanka.
The court judged that Switzerland had therefore violated article three of the European Convention on Human Rights, which prohibits torture or degrading treatment and the extradition of a person to a foreign state if they are likely to be subjected to torture there.
Switzerland must now pay the man 30,000 euros in damages and 4,770 euros in costs.