He takes over from assistant coach Wayne Smith, who announced last month he was leaving the world champions, saying he needed to “take a break” from the game.
McLeod, who played 10 Tests in the mid-1990s, has signed on as a defence coach through to the 2019 World Cup.
He will join the All Blacks for the Rugby Championship series, but does not officially start his role until the end-of-year northern hemisphere tour.
Head coach Steve Hansen said he had been impressed with what McLeod had done with the Highlanders, one of the best defensive teams in Super Rugby that also beat the British and Irish Lions.
“Internally there were a couple of real obvious candidates, and it was nice that Scott applied and he interviewed really well, particularly in the areas we are keen on.
“He is following someone who has done a magnificent job, but he doesn’t want to be Smithy, he wants to be Scott McLeod, and that is massively important.
“You have to come in and be your own person and do it how you want to do it, and all the structures that Smithy has set up (McLeod) is familiar with because they talk a lot on the phone, and he clearly displayed in the interview that he has his own ideas as well.”
McLeod said in a statement on the All Black website: “I’m very honoured and excited to be given the opportunity to work with the All Blacks as the defence coach. Having worked in Super Rugby for the last eight years with some of New Zealand’s top rugby talent, I was highly motivated to continue that, but at a higher level.
“To work with the All Blacks in pinnacle events will be both challenging and rewarding. I’m very grateful to the Highlanders club for supporting me for the last five years and also encouraging me into this role.”