Voters will have the chance to say yes or no to legalising cannabis at the 2020 election, based on draft legislation to be drawn up beforehand.
Cabinet ministers have agreed the referendum will be binding, based on agreement by all three governing parties.
"The voters' choice will be binding because all of the parties that make up the current government have committed to abide by the outcome," Justice Minister Andrew Little said.
The draft legislation would include:
- A minimum age of 20 to use and purchase recreational cannabis
- Regulations and commercial supply controls
- Limited home-growing options
- A public education programme
- Stakeholder engagement.
Read the referendum Cabinet paper here
Mr Little said there would be a clear choice for New Zealanders at the general election, with a simple yes/no answer.
"The coalition government is committed to a health-based approach to drugs, to minimise harm and take control away from criminals," he said.
"The referendum is a commitment in the Labour-Green confidence and supply agreement, as well as a long-standing commitment from New Zealand First to hold a referendum on the issue."
The reason for making the age 20 was that setting it too high encouraged a black market, which was precisely what the government was trying to avoid, Mr Little said.
Green Party MP Chloe Swarbrick, who has worked on the Cabinet paper with Mr Little, said there was no way people would be allowed to light up in the street or outside schools.
"There will be limited spaces where people can consume, those are private premises and licensed premises."
The Electoral Commission will draft the referendum question to appear on the ballot, Mr Little said.
He also ruled out any other government initiated referenda at the 2020 election - Mr Little had flagged one relating to electoral reform and party vote thresholds.
He said the cannabis referendum would be binding and he "hoped and expected" the National Party would also commit to respecting the voters' decision.
The Green Party said this announcement showed consensus across the government for a "transparent and detailed law" to give voters the clarity they needed before voting.
"Having the proposed law developed and released ahead of the referendum is key," Ms Swarbrick said.
"We've made it abundantly clear throughout the negotiations that our preferred position was to see legislation passed through Parliament before the referendum so it was 'self-executing' with a majority 'yes' vote.
"But we didn't gain consensus on that step", she said.
"As it is, a 'yes' vote will be informed by a clear regulatory regime set out in draft legislation that people will know and understand. We will avoid any potential of a 'Brexit' situation because people will know exactly what the future holds, and how these changes will be implemented."