The ministry and police confirmed Mr Coster had been appointed as deputy chief executive of the ministry on a two-year secondment from police.
Mr Coster left the Southern district in August last year to take up the role of strategy and transformation assistant commissioner after two years as Otago and Southland's top policeman.
A police spokeswoman said Mr Coster began the secondment last month and police were recruiting to replace him for the duration of the two-year vacancy.
The secondment was part of the state sector leadership and talent work co-ordinated by the State Services Commission, which pushed for swapping of senior talent across the public sector, the spokeswoman said.
Mr Coster previously spent time as a prosecutor in Auckland's Crown Solicitor's Office and holds a law degree.
He joined the police at 21, became an inspector at 30 and was the youngest district commander in New Zealand when he was appointed to his role in the Southern district.