The move won't affect existing permits for exploration or extraction, meaning the industry is likely to continue in the South Pacific nation for several more decades.
Still, the move is a change in direction after voters last year elected the liberal government led by Prime Minister Jacinda Ardern. That followed nine years of conservative leadership under a government that favored expanding the industry.
Ardern has pledged to go green by reducing the country's net greenhouse gas emissions to zero by 2050. Her government also plans to plant 100 million trees each year and ensure the electricity grid runs entirely from renewable energy.
The oil and gas industry is relatively small in New Zealand, employing about 11,000 people and accounting for about 1 percent of the overall economy. It is dwarfed in importance by farming and tourism.
But the industry is important to the Taranaki region, where most of the activity is centered.
New Plymouth Mayor Neil Holdom told Radio New Zealand the move was a "kick in the guts for the future of the Taranaki economy."
But Ardern said nobody would be losing their jobs as a result of the move.
"We're striking the right balance for New Zealand," Ardern said. "We're protecting existing industry, and protecting future generations from climate change."
Opposition lawmaker Jonathan Young described the move as "economic vandalism."
"This decision is devoid of any rationale. It certainly has nothing to do with climate change," Young said. "These changes will simply shift production elsewhere in the world, not reduce emissions."
The idea of an expansion in offshore drilling has proved contentious in New Zealand, particularly after problems elsewhere like the 2010 Deepwater Horizon oil spill in the Gulf of Mexico.
Environmental group Greenpeace hailed Ardern's move. Russel Norman, the group's executive director in New Zealand, said the country "has stood up to one of the most powerful industries in the world."
The announcement does not apply to onshore exploration permits. The government said those would continue for the next three years and be reviewed after that.