Vern Cotter's side will face the Asian champions on Saturday 18 June at Toyota Stadium, Toyota City, and the following Saturday at Ajinomoto Stadium in Tokyo.
Both matches, at venues that will host games at the next Rugby World Cup, have a kick-off time of 11:20 BST.
Scotland beat Japan 45-10 at last year's finals in England on their way to qualifying for the quarter-finals.
BBC Scotland has secured the live television rights to show Scotland's two-Test series against Japan in June.