Team Melli will play the UAE in the Pantai Batu Buruk, Kuala Terengganu on Saturday.
Iran also qualified for the 2017 FIFA Beach Soccer World Cup in Bahamas.
The Japanese will now play Lebanon in the tournament’s third-place Play-off for Asia’s final slot in the Bahamas on Saturday.
Japan drew first blood through Takasuke Goto’s neat header, but Iran equalized soon after thanks to a fine strike by skipper Mohammad Ahmadzadeh.
It was Japan who were to regain the lead as Takuya Akaguma struck home from distance after catching custodian Hamid Behzadpour unaware, before Moslem Mesigar delivered a free-kick which skipped off the sand and into the goal to level matters for a second time.
Japan scored a third courtesy of Takaaki Oba, only for Mohammadali Mokhtari to make it 3-3 at the end of an entertaining first period.
Japan duly made it 4-3 following skipper Ozu Moreira’s magnificent free-kick a minute into the second period. Iran hit back yet again, Abdollahi’s set-piece striking the post before going in to continue the game’s roller-coaster nature.
Iran went ahead for the first time when Mokhtari claimed his second in the match a minute before the buzzer, and they duly increased their advantage as Ahmadzadeh fired home to double his tally after the restart.
Akaguma then reduced the deficit with an impressive volley, only for Iran to score yet again through Abdollahi and, despite Goto giving Japanese hopes a brief lift with a late effort, secure a hard-fought victory.