Carpenter Medhanie Tesfamariam Berhe was arrested in Sudan in 2016 on suspicion of being at the heart of one of the world's largest migrant trafficking networks, but after a 21-month trial the court ruled police had the wrong man.
Behre was accused of being Medhanie Yehdego Mered, known as "the General" and was extradited to Italy.
But the Palermo court accepted his argument that this was a case of mistaken identity. It did however give him a five year prison sentence for aiding illegal immigration.
The judge ordered he be immediately set free, having spent over three years behind bars already.
"Behre's personal information in the court documents must be amended," the judge ordered.
He had been accused of running a vast network, with branches in Eritrea, Ethiopia, Libya, Sudan and the United Arab Emirates, as well as Europe.
Italy, Sudan and Britain at the time hailed his capture as the stellar result of a joint operation which had dealt a significant blow to the people smuggling business.
Despite differences in appearance between the two men, and DNA evidence supporting Berhe's case, Italian prosecutors stuck to their guns throughout and called for a 14-year jail sentence.
Mered ended up on an international wanted list after being identified as the man who organised the packing of migrants onto a boat that sank off Italy in October 2013, killing at least 360 people in one of the worst such disasters in the Mediterranean.