Prime Minister Zoran Zaev narrowly secured the two-thirds majority needed in the historic vote amid a boycott by opposition nationalists.
Protesters outside parliament denounced what they called an act of treason.
The name change is aimed at ending a 27-year dispute with Greece, which has its own region called Macedonia.
The Greek parliament must now give its approval under a deal signed by Greek Prime Minister Alexis Tsipras and Mr Zaev in June.
That will lift Athens’ veto on Macedonia’s bids to join Nato and the European Union.
BBC