The measure, which now has to go to the Chamber of Deputies lower house for final approval, declassifies irregular immigration from a "crime", which risks prison time, to an "administrative infraction".
The draft text said it would still be a crime if migrants return following an expulsion order or if they fail to report to police when asked to do so, which happens often with undocumented migrants.
Italian prisons are full of migrants jailed for illegal immigration and the laws have been criticized for putting off potential rescuers of migrants at sea who can be charged with aiding and abetting.
The draft was the result of a compromise between leftists and rightists in Italy's uneasy governing coalition but angered the anti-immigration Northern League, a minor but vocal opposition party.
"No to abolishing the crime of illegal immigration!" read signs help up by senators from the party.