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 is His slave and Messenger.
Imprisonment is not an impediment from issuing Fatwa. A prisoner can issue Fataawa and teach; for example Prophet Yoosuf (Joseph) issued Fatwa to the two men who were with him in the prison, as Allaah says (what means): {O two companions of prison, as for one of you, he will give drink to his master of wine; but as for the other, he will be crucified, and the birds will eat from his head. The matter has been decreed about which you both inquire.”}[Quran 12:41]
Indeed, scholars, such as Imaam Ahmad ibn Hanbal and Shaykh Al-Islam Ibn Taymiyyah and others, have issued Fataawa and written books of religious knowledge while in prison and Allaah made their knowledge a source of benefit for many.
Allaah knows best.