NZR chief executive Steve Tew and Prime Minister Bill English confirmed the fixture in Tokyo.
RNZ reports the All Blacks will play the Brave Blossoms in November 2018 ahead of their annual end of year European Tour.
Tew said the test met several objectives.
"Interest in rugby in Japan is on a high and will only build as we get closer to Rugby World Cup 2019. The test will not only provide a great opportunity to prepare for the 2018 end of year tour, it also gives the team first-hand experience of playing in Japan less than a year out from the tournament.
"Playing in Japan is always a highlight. Their fans love the game and are great supporters of the All Blacks and New Zealand rugby. Our partners adidas and AIG are also very active in using our players in the region in various campaigns and promotions, so I expect there will be keen interest in the match."
The All Blacks have played Japan five times before. They played Japan in Tokyo twice in 1987 (the matches weren't given test match status) and again in 2013.
The two sides also met at the 1995 and 2011 Rugby World Cups. The All Blacks have also played a Bledisloe Cup test against Australia in Tokyo, in 2009.