Englishman Moles, 47, has just started his third season as coach of New Zealand state side Northern Districts, taking them from bottom to top of the State Championship in his first season in charge.
He was forced to retire from playing in 1998 by an achilles tendon injury, but has since gained extensive coaching experience with Free State, Hong Kong, Kenya and Scotland.
The frontrunner to replace current coach John Bracewell, New South Wales coach Matthew Mott, withdrew over the weekend.
New Zealand Cricket (NZC) chief executive Justin Vaughan said Moles would begin his job next week and would be at the helm when the Black Caps take on the West Indies here next month.
"Andy has an outstanding coaching background," Vaughan told a media conference.
"He has made a real impact at Northern districts over the past two seasons and also brings more than 15 years' experience coaching." Moles said he was thrilled to have the opportunity.
"I have no doubt that I am the right person for the job right now to move things forward with this team."
Vaughan also announced that former test opener and India coach John Wright would become a national selector.