All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Scholars held different opinions as to whether the sorcerer should be declared a disbeliever or merely a Muslim sinner committing a major sin, and the ruling on performing the funeral prayer over him differs accordingly.
If we follow the scholarly view that the sorcerer is declared a disbeliever, then know that it is impermissible to perform the funeral prayer over a disbeliever; Allah, the Exalted, says (what means): {And do not pray (the funeral prayer, O Muhammad) over any of them who has died - ever - or stand at his grave. Indeed, they disbelieved in Allah and His Messenger and died while they were defiantly disobedient.} [Quran 9:84]
An-Nawawi underlined the consensus of scholars that it is prohibited for Muslims to perform the funeral prayer over a disbeliever in his book Al-Majmoo’.
Based on the other scholarly view, which says that the sorcerer is not declared a disbeliever, it is allowable to perform the funeral prayer over him because the Muslim sinners are in need of seeking the forgiveness and mercy of Allah for them. However, the pious and virtuous people should not perform the funeral prayer over them.
We have previously underlined the prohibition of accusing others of practicing sorcery, especially the parents, without solid evidence in fatwas 323014 and 326329.
Allah knows best.