After a long debate in which many of Spain's major politicians spoke about the role of the monarchy in Spanish society, MPs voted on the bill.
A total of 299 MPs voted for the bill, 19 voted against the legislation and there were 23 absentions from a total of 341 votes.
The vote is part of the process that will see the king's son Crown Prince Felipe become Spain's second post-dictatorship monarchy.
It came after King Juan Carlos's surprise June 2nd announcement that he intended to abdicate.
That announcement sparked pro-republican demonstrations around Spain, while a poll carried out by Spain's El País newspaper showed 62 percent of Spaniards favour a vote on the future of the monarchy.
The result of Wednesday's vote was widely predicted but proceedings were not without controversy.
Members of the United Left (IU party who voted against the legislation were jeered by other politicians, and former IU leader Gaspar Llamazares cried out "No, for more democracy!" when asked for his vote.
Members of the left-wing Basque nationalist and separatist party Aimur also walked out of the parliament just before the vote was held.
Eduardo Madina, who is considering standing for the top job with Spain's main opposition party, the socialist PSOE, and who on Tuesday again outed himself as a republican, voted in favour of the legislation.
Fellow socialist deputies Guillem García Gasulla and Odón Elorza were the only members of the struggling party to not to vote in favour of the bill. Both abstained.