Nearly $200m will be spent on urgently building pop-up jail cells to cope with the growing prison population.
The new "rapid build modular units" would be able to fit 600 additional inmates, according to Budget documents.
They will be in place by the end of 2019.
Another $316m over four years will go towards the operating costs related to the growing prison muster.
The coalition Government has committed to reducing the prison population by 30 per cent over 15 years.
The prison muster is currently 10,700 - leaving just 350 spare beds. It is forecast to rise 12,000 by 2025.
Total spending on prisons will exceed $1b for the first time in the next year. It will rise to $1.03b in the next year, an increase of $40m.
"Government spending on prisons has been described as a moral and fiscal failure," Corrections Minister Kelvin Davis said.
"Budget 2018 marks the start of this Government's plans to reform New Zealand's Corrections landscape."
He said the most serious offenders would still be imprisoned.
But the Government wanted to ensure that there was more support for ex-prisoners in the community and to prevent reoffending.
To address this it has put $57.6m into housing and support services, which will help 300 people a year. It would cover housing costs, job training, health services, and other services.
Another $82.7m over four years would be spent on increasing the number of probation officers by 270, and electronic monitoring would get $8.6m in funding to expand it to 1000 people in total.
Alcohol treatment centres would be maintained and expanded through funding of $8.6m
There are no details on the expansion of Waikeria Prison, which the Government is due to make a decision on this month.
Finance Minister Grant Robertson said today that Cabinet was still working on its decision. Funding had already been allocated for expansion of the Waikato-based prison.
He said the Government did not want to keep building prisons, but that Waikeria would need upgrading because it was old and rundown.
New spending of nearly $300m will go towards expanding the police force - a key election promise and part of Labour's coalition agreement with NZ First.
The coalition Government has promised 1800 new officers, including 1100 more officers on the streets.
The funding in Budget 2018 will enable the recruitment of 920 new officers and 240 support staff.
That was on top of 880 new police officers and 245 support staff which were funded in the previous, National Government Budget last year.
International drug trafficking will be targeted through a $54.2m funding boost for Customs over the next four years.
It would allow Customs to hire an additional 127 staff in New Zealand and overseas.
The new spending will also go towards measures which help Customs officers make drug seizures offshore, and will support maritime patrols and other frontline resources.
Another $4m will pay for new inflatable boats, mobile x-ray vans and resources for detector-dog teams.
Customs Minister Meka Whaitiri said criminal networks were motivated by the relatively high cost of illicit drugs in New Zealand, and were becoming more sophisticated.
Drugs like methamphetamine and cocaine were being seized in larger quantities at the border, she said.
The estimated social cost of illegal drugs was $1.8 billion a year.