Eighty-one deputies in the 120-seat parliament voted in favour.
Representatives of the opposition VMRO-DPMNE, who opposed the agreement with Greece, boycotted the vote.
The countries struck the deal on the new name in June, but Macedonia will start using it only after the parliament in Athens also ratifies the agreement.
Greece blocked its neighbour's aspirations to EU and NATO membership over the use of 'Macedonia', which it said implied territorial claims by to a Greek province of the same name.
At the start of the parliamentary session, Prime Minister Zoran Zaev told deputies the name change would "open the doors to the future, Macedonia's European future", and to joining the North Atlantic alliance.
Several hundred people have protested against the deal in front of parliament over the past three days.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ