The earthquake-damaged Defence House in Wellington will be demolished.
The 10-year-old building on Aitken Street was badly damaged in the 14 November 7.8 magnitude earthquake, and its demolition has been rumoured for weeks.
Its owner, AMP Capital, told the New Zealand Defence Force about the building's fate this week, saying repairs were not economically viable.
The Defence Force said the building did not present any immediate risks to health and safety, so it would be carefully deconstructed.
It said the 900 staff evacuated from the building would all be based in the nearby Freyberg Building by the end of April.
Long-term accommodation options for the Defence Force and the Ministry of Defence were still being considered.
Public Service Association national secretary Glenn Barclay said his members were wondering why it took so long to reach a decision, but they were pleased to finally have some certainty around the building's future.
Mr Barclay said he was looking forward to working with the Defence Force while they sorted out a more resilient set-up for the force's Wellington staff.