The 68-32 vote comes after months of debate and a recent deal to boost border security spending significantly.
But the legislation faces a tough road in the more conservative House.
House Speaker John Boehner has said he will not advance legislation that lacks support of most of his fellow Republicans, who remain resistant.
After the bill’s passage on Thursday, President Barack Obama said the vote brought the US “a critical step closer to fixing our broken immigration system once and for all”.
“Today, the Senate did its job,” Barack Obama said in a statement.
“It’s now up to the House to do the same.”
Barack Obama has made immigration a top priority for his second term, asking Congress to deliver a bill for him to sign by autumn.
As the vote was held on Thursday afternoon, Senate Majority Leader Harry Reid, a Democrat, made the rare request of asking all 99 of his colleagues to be present and to vote from their desks.
“This is not a vote where people should be straggling in,” Harry Reid said.
After the vote, members of the bipartisan group that negotiated the original bill, known as the Gang of Eight, thanked the broad coalition that had backed immigration reform efforts.
One member of the group, Democratic Senator Dick Durbin, said the voices of young undocumented immigrants “had made a difference”.
Republican Senator Lindsey Graham said the bill’s border security measures had “exceeded every expectation I had”, and said the bill had “practically militarized the border”.
Forward movement on the bill comes shortly after two Republican senators this week brokered a compromise to increase the bill’s funding of border security measures. An amendment that added an additional 20,000 border security agents was passed on Wednesday.
Earlier, the non-partisan Congressional Budget Office estimated the legislation, without the increased border funds, would reduce the US budget deficit by $175 billion over 10 years and boost economic growth.
And analysts say many Republicans acknowledge reforming the immigration system will be key for their election prospects in the future as Hispanics become an increasingly important voter bloc.
On Thursday, John Boehner, the Republican House speaker, said the House would not take up the Senate bill directly.
“We’re going to do our own bill… that reflects the will of our majority and the will of the American people,” he said.
John Boehner’s comments cast doubt on the chances legislation will quickly reach Barack Obama’s desk, and could portend failure for immigration reform entirely, analysts say.
Separate bills designed by House Republicans include stricter border and interior security measures, employment checks and most significantly, no path to citizenship for undocumented immigrants.
Some Republicans believe such a programme rewards those who broke the law by immigrating to the country illegally.
Senator Chuck Grassley, who voted against the Senate bill, said he was counting on the House to pass legislation that is “much more tough”.
What’s in the Senate immigration bill?
See Full Bill Text
FbcwbOpxLSYAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…