Swiss voters rejected the proposal to "automatically deport foreign criminals" who commit minor crimes with 58.9 percent, in a referendum on Sunday.
The poll came at a time when European countries have started to raise their voices about the refugee crisis.
The proposal came from right-wing Swiss People’s Party (SVP) which has accused the parliament of dragging its feet on writing the text into law and watering it down last March.
Six years ago, Swiss voted for strengthening rules to automatically deport foreign nationals convicted of violent or sexual crimes.
According to Switzerland, law system is used for the three administrative levels municipality, canton, country. For any change voters can change a law by a popular ballot. To be passed it must be approved by a majority of cantons as well as a majority of electors.
If passed, the proposal would have dramatically increased the number of offences that can get foreign nationals automatically kicked out of Switzerland, including misdemeanours usually punishable with short prison sentences or fines.
It would also have removed a judge's right to refrain from deportation in cases where it would cause the foreign national "serious personal hardship."
Hundreds of celebrities and 50,000 people signed a petition against the proposal.
According to the Swiss Federal Statistical Office, the number of people who could have been expelled from the country under the proposed draft would have shot up from 500 to 10,200.
The Swiss government says only two percent of foreigners living in Switzerland have been granted citizenship.
Opponents had warned if the proposal passed, people born to foreign parents in Switzerland risked being deported to countries they have never lived in, just for petty offences.
"This initiative would have been contrary to the rule of law, as it would have muzzled the judges. That's why we mobilised in this campaign," said Cristina Gaggini, who leads a Swiss organisation representing several businesses.
In 2010 Swiss voted for a proposal and which passed with 52.9 percent for the deportation of foreigners found guilty of murder, rape and other serious sexual offences, violent crimes like robbery, drug trafficking and abusing social aid.