All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, it should be noted that it is not permissible to accuse a Muslim of having committed a sin without evidence because in principle a Muslim is innocent and it is an obligation to think good of him; for more benefit, please refer to Fataawa 100199 and 92167.
Therefore, if accusing this Imaam of doing magic is without evidence, then this is not permissible and one should repent from this. It should be noted that the fact that this man uses jinn does not necessarily mean that he is a magician despite the fact that using the jinn is also forbidden. For more benefit, please refer to Fatwa 85875.
However, if you have evidence that this man did magic, then there is no doubt that this is a great sin; rather, the Quran mentioned that this is Kufr [disbelief]. Allaah Says (what means): {But they [i.e. the two angels] do not teach anyone unless they say, “We are a trial, so do not disbelieve [by practicing magic].”}[Quran 2:102] Moreover, the Prophet considered this to be among the seven great destructive sins. Therefore, you should advise him to repent to Allaah, and if he is not deterred and continues to do magic, then take his matter to whoever may deter him from doing this evil. For more benefit, please refer to Fatwa 118900.
Furthermore, it should be noted that treating magic and possession by jinn is something easy, Allaah willing, by observing the mention of Allaah, performing Ruqyah and relying upon Allaah. For more benefit, please refer to Fataawa 2566 and 18351.
Allaah Knows best.