The proposal to put the issue to a public vote passed 63-57 during a heated late-night debate in parliament.
It means when Kiwis go to the polls late next year they will not only be voting for their preferred government but also on two referendums -- one on legalising euthanasia and the other on allowing recreational marijuana use.
While a final vote to confirm a referendum on the End of Life Choice Bill will be held in November, it is considered a formality after the plan won crucial backing from the New Zealand First (NZF) Party.
"This is an emotive topic. It's a divisive topic... but we should have the courage to allow the voting public to participate in this conversation," NZF's Jenny Marcroft told parliament.
NZF had threatened to pull support for the bill if the referendum proposal was rejected and parliament tried to simply pass the legislation.
Prime Minister Jacinda Ardern has publicly stated her support for euthanasia reform and reluctantly voted for the referendum, saying earlier this week that it was the only way of advancing the legislation.
Members of Ardern's centre-left Labour Party were given a conscience vote on the issue, as were members of parliament's largest party, the conservative Nationals.
National lawmaker Harete Hipango described the euthanasia legislation as "abhorrent, repugnant and also dangerous".
"This is a kill bill. My focus and my intention is that I seek to kill this bill because of the repugnancy of what it intends to do," he said.
"The state has a duty of care to protect our most vulnerable."
The lawmaker behind the bill, libertarian David Seymour, said the proposal had safeguards to protect the vulnerable.
"This is a bill only for people who have a terminal illness as diagnosed by two doctors," he said.
"It is for people who are, sadly, at the end of their lives, and it is a choice... only the person whose life it is can make the choice."