Kilmar Abrego Garcia will self-deport to Spain amid a struggle with the US government to prevent his deportation to Africa.
He was told to self-deport by a judge on Tuesday, local time.
Mr Abrego Garcia was previously mistakenly deported to a prison in El Salvador, which the Trump administration called an "administrative error".
A Salvadoran national who the US mistakenly deported to his home country last year is self-deporting to Spain, according to a person familiar with the matter who spoke on the condition of anonymity because they were not authorised to publicly discuss the case.
Kilmar Abrego Garcia became a focal point in the US's immigration debate after the deportation error and had been fighting a second deportation to Africa.
Maryland senator Chris Van Hollen said Mr Abrego Garcia was a "free man" who was travelling to a country of his choice.
"I am relieved that he will be safe, in a country of his choosing, and free — including from this administration's constant persecution," he said.
The 31-year-old has an American wife and child and has lived in Maryland for years, but he immigrated to the US illegally as a teenager.
Department of Homeland Security officials had proposed deporting Mr Abrego Garcia to a series of African countries.


