The bill also aims to fulfil New Zealand's obligations under the landmark 2015 Paris climate agreement just as the United States under President Trump begins the formal process of pulling out of the deal.
New Zealand has passed a law aiming to make the country carbon neutral by 2050.
New Zealand's plan to reduce carbon emissions to net zero by 2050 became law on Thursday, when it cleared its final hurdle in parliament.
The bill has different regulations for methane emissions from animals versus other greenhouse gases, due to farming's important role in bringing in foreign income.
"We're here because our world is warming". 'And so therefore the question for all of us is what side of history will we choose to sit on'.
Methane emissions would be reduced by 10% by 2030 and by between about one-quarter and one-half by 2050.
The bill establishes an independent Climate Change Commission to advise the government on how to achieve its targets and to produce "carbon budgets" every five years saying how many emissions will be allowed in that period.
Prime Minister Jacinda Ardern said countries are not moving fast enough when it comes to combating climate change. "Undeniably, the science tells us the impact on flora and fauna - yes, also the spread of diseases in areas where we previously haven't seen them", she said.
'We've led the world before in nuclear disarmament and in votes for women, now we are leading again, ' he said.
Those animals release methane, resulting in an unusual greenhouse gas emission profile for the country as nearly half of total emissions come from agriculture.
Nearly half of total emissions come from agriculture.
Agricultural methane is excluded from that target, but phased reductions are required over time.
Following earlier promises by President Donald Trump, the US this week began the formal process of pulling out of the deal.