A deputy director general at the Ministry for Primary Industries will take over as the interim head at the end of the month.
Scott Gallacher will replace Wayne McNee as acting director general and chief executive when Mr McNee leaves to become CEO of animal genetics company Livestock Improvement.
Mr Gallacher currently heads MPI's resource management and programmes division.
He joined MPI's predecessor MAF in 2011 after working for the Ministry of Fisheries and the Ministry of Foreign Affairs.
The State Services Commission is recruiting for a permanent director-general.