The Israeli High Court of Justice has ordered the closure of the Holot detention facility within 90 days, where up to 2,300 Sudanese and Eritrean asylum seekers are held.
The court also cancelled an amendment to Israel's Anti-Infiltration Law, passed by the Israeli parliament nine months ago, which decided that illegal immigrants could be incarcerated without trial.
Those held at the detention facility are required to stay at the centre from 10pm to 6am and must show themselves for a count three times a day and are not allowed to enter into work while in Israel.
If the refugees breached the terms of their stay at Holot, the Population and Immigration Authority was allowed to detain them for up to one year, according to Israel law.
A panel of nine judges voted nine to two in the ruling, the same bench that rejected an amendment that allowed authorities to imprison asylum seekers for three years without trial.
Petitioners for the closure of the facility said the attempts to push migrants out of Israel was "no more than an attempt to force them to 'deport themselves'". They added that the facility was not "open" but cut off from the outside world, leaving the migrants isolated.
"Encouraging people to return 'voluntarily' to these countries, certainly when it is done negatively by depriving them of personal freedom and autonomy, is no more than an attempt to force them to 'deport themselves' to a place to which the State of Israel has declared it is dangerous to return them," the petition reads.
"The facility is fenced and cut off from the outside world. The ability of those held there to reach inhabited locales outside or to conduct daily activities such as buying food they like and cooking it, meeting people outside the facility or taking part in social events does not exist."
Earlier this year, detainees told The Telegraph that the facility felt like a "jail" despite it being classed as "open" by Israeli authorities.
"This is a jail. We are prisoners here," said Tumizgie Okebamrime. "Inside we have police, security guards and immigration. I came to Israel because I thought it was a democratic country. I would never have come here if I had known it was like this."
The refugees started to enter Israel from Egypt in 2006 before authorities constructed a border fence to restrict entry. It has been reported that Israel uses the threat of the detention facility and cash sums to entice refugees to return to their home countries or a third country.
Human rights groups have argued most of the African migrants attempting to enter Israel cannot be deported back to their home countries because of direct threats to their lives in places such as Sudan and Eritrea.