The Lions will host the Brave Blossoms in Edinburgh next June ahead of their tour of South Africa.
It will mark just the third time the Lions have played on home soil following games in Cardiff against Argentina in 2005 and a Rest of the World XV in 1986.
"We saw Japan play some excellent rugby during the World Cup and they will come to Edinburgh fully-motivated to win," Lions head coach Warren Gatland said.
Japan head coach Jamie Joseph said it was a "once-in-a-lifetime opportunity" for the players.
The Lions play South Africa in three tests in July-August.