Team Melli lost to host 6-2 in Berlin's Max-Schmeling-Halle on Saturday.
In another semi-final, Austria defeated Australia 2-1 and qualified for the final match.
Iran will meet Australia on Sunday in third-place match, while Germany and Austria play in the final.
The 2018 Men's Indoor Hockey World Cup is the fifth edition of this tournament and played from 7 to 11 February 2018 in Berlin, Germany.
The Netherlands is the reigning champion, but was not able to defend its title due to its poor performance at the 2016 European Indoor Championship.