“Brigadier General Hamid Taghavi was martyred during a mission to advise the army and Iraqi volunteers… in the city of Samarra,” north of Baghdad, said a statement from the elite Iranian military force.
His funeral will be held on Monday in Tehran, it added.
Samarra, 110 kilometres (70 miles) north of Baghdad, is a mainly Sunni city but also home to the Askari shrine, one of the holiest sites in Shiite Islam.
Iran has sent military advisers to Iraq to help train and equip army troops and allied militias in their counteroffensive against Daesh, which seized large areas of the country in a June assault.
It has also armed Kurdish forces in northern Iraq.
Iran is not participating in a US-led coalition conducting air strikes against Daesh positions in Iraq and neighbouring Syria but has played an active role in sending advisors and weapons.
Iranian media have reported the deaths of several military personnel in both Iraq and Syria this year.
Error: No connected account.
Please go to the Instagram Feed settings page to connect an account.