Prime Minister Narendra Modi's Hindu nationalist administration has been pushing to criminalise "triple talaq", under which a man can divorce by uttering the word "talaq", meaning divorce in Arabic, three times in his wife's presence.
India is one of the few countries where the practice has survived in law.
Indian Vice President Venkaih Naidu announced the result of the vote in the Upper House of Parliament in New Delhi.
The Lower House backed the bill, which will make anyone practising instant divorce liable to prosecution, last week.
The legislation now only requires the signature of the president - considered a formality - to become law.
Some Indian Muslim groups have said triple talaq is wrong, but believe the practice should be reviewed by community leaders rather than the government.
But Law Minister Ravi Shankar Prasad says this is a sign of India moving forward.
The passage of the bill is seen as a victory for India's Hindu nationalist Prime Minister Narendra Modi, who said the bill "corrects a historical wrong done to Muslim women".
Opposition parties say the new law could be used to harass Muslim men.
Mr Modi posted on Twitter, however, that "an archaic and medieval practice has finally been confined to the dustbin of history", adding that it was "a victory of gender justice".
Critics have long accused Mr Modi's ruling BJP party of a bias against minority Muslims, which the BJP denies but adding that it is opposed to the appeasement of any community.
More than 20 countries, including neighbouring Pakistan and Bangladesh, have already banned the practice.
Muslim women who have been campaigning against it say they are delighted.
The majority of Muslims in India is close to the bottom of economic and educational indicators. and critics of the legislation say that divorce is not one of the main issues facing the community.
Listen to the feature in Bangla in the audio player above.