The foreign ministry said the fair had, "under the pretext of freedom of expression, invited a person who is hated in the Islamic world and create the opportunity for Salman Rushdie... to make a speech".
It said the Islamic republic "strongly protests" Rushdie's appearance and had decided against participating in the fair, which is one of the world's largest such events.
The ministry called on other Muslim nations to join its boycott.
Rushdie, a Muslim and British citizen who lives in the United States, was made subject of a 1988 fatwa (religious edict) that called for his killing after his fourth novel, "The Satanic Verses," was published.
Also Read
The Islamic republic's founder, Ayatollah Ruhollah Khomeini, issued the order after he and many others in the Muslim world said Rushdie had depicted Muslim prophet Mohammed irreverently.
The fatwa forced the writer into hiding and led the British government to place Rushdie under police protection. In recent years, the author has attended many public events though sometimes cancelled at short notice.