Ministry for Primary Industries chief executive Wayne McNee has resigned to take up a role as chief executive of Livestock Improvement Corporation.
Deputy State Services Commissioner Sandi Beatie said Mr McNee was an effective and highly regarded state sector chief executive.
"Wayne has achieved a great deal in 14 years as a state sector chief executive and we would be happy to see him return to the public service in the future.
Minister for Primary Industries Nathan Guy and Food Safety Minister Nikki Kaye thanked Mr McNee for his 14 years as a chief executive in the public service.
"He has overseen the merger of MAF with the New Zealand Food Safety Authority and the Ministry of Fisheries to create the Ministry for Primary Industries in 2012," Mr Guy said.
Mr McNee became general manager of Pharmac in 1998, then chief executive in 2001.
He became chief executive of the Ministry of Fisheries in 2008 and was then appointed chief executive of the Ministry of Agriculture and Forestry in 2010.
He went on to be chief executive of the Ministry for Primary Industries in 2011, following the merger of MAF and MFish.
Mr McNee is obliged to give three months notice and a recruitment process to appoint a successor will begin shortly.