Islamic philosophers of the middle ages did not address this problem in any direct fashion. This maybe because in the context of Muslim thought, the existence of God was a prerequisite. In fact, the aim of the philosophers was to prove the existence of God using Aristotelian logic. So we do not find Muslim philosophers arguing against the existence of God, on the contrary they are attempting to justify the qualities of God from a philosophical perspective.
The Muslim philosophers did, however, tackle a different but somewhat similar issue concerning the unity of God. The central problem facing them was how to reconcile the absolute unity and perfection of God with the fact that there exists in the world such great amounts of imperfections. If God is all perfect and the world is a result of divine will, we are then faced with the problem of duality between God and His will. Yet it is this very difference (i.e. the imperfection of the world) that sets it apart from God (who is perfect).
How is this consistent with the absolute unity (tawhid) of God which is so central to Islamic doctrine? This issue had been one of the major issues of Muslim thought, and was a subject of great debate between Al-Ghazzali, and other neo-platonic Muslim thinkers [Landau, p. 17].
It is, however, difficult to find any direct analogue to the problem of evil in medieval Islamic philosophy. However, some positions held by early Muslim thinkers maybe relevant to the free will defense. Early Muslim Aristotelian thinkers like Ibn Sina held that God is a necessary being, who had no other attributes besides His existence, and that all other beings emanated from the divine by necessity. Despite holding this position, they attempted to reconcile it with Islamic doctrines.
Ghazzali points out that this is not possible. That is, to say that whatever proceeds from God does so by necessity denies God agency, i.e. it denies Him Free Will. If God has no will, since he has no attributes, then God has no free choice to decide which world to create. It seems that Ghazzali's criticism can be equally applied to advocate of the problem of evil who states that God by necessity must always in a way that will ensure that its consequences are wholly good. This would then break down the dilemma posed by trying to reconcile the divine attributes of omniscience, omnipotence, wholly goodness versus the reality of evil in the world. Since, now God would not be obliged to abide by the condition of wholly goodness [Ghazzali, p. 63].
Another stream of thought in Islam, advocated by Ghazzali, Ibn Arabi, Al-Attas and Islamic mystical traditions, is to argue that the only true way to grasp the ultimate reality, and thus resolve this problem is through a "direct awareness of Reality," unencumbered by intellectual interference (Laudau 20). This aspect will be discussed at length in the Arguments from Religious Experience section.
The lack of intense debate on the problem of evil maybe because the problem was not formulated at the time, or that Muslim thinkers were preoccupied by other issues. In modern times, the 20th century Islamic philosopher Muhammad Iqbal does attempt to address this problem.
He suggests that Goodness would not be possible without the resistance of evil. The evil in the world is meant to be overcome. Whoever asks why must there be evil when God can remove it is missing the point. Iqbal insists that without evil there could be no moral or spiritual development. He sites a simile used by Kant in which he refers to birds who resent the resistance of air, yet it is the very air that allows them to fly high, they would be unable to do so in a vacuum. Likewise, a certain amount of evil is necessary for the inner growth of humans, so that they may be able to overcome it [Sharif, p. 1628]. As the Quran states, "And for trial will We test you with evil and with Good" [21:35].
Iqbal could here be subject to criticism, since he has ignored the victims of evil. What about those people who suffered so the rest of mankind could build itself? Iqbal's answer here would be consistent with his philosophy of self. Like Nietzche, Iqbal believed that ultimately the self, the individual is the only thing of utmost importance. That is we have no concrete knowledge of the external world and factors therein. What we can be sure of is only ourselves, hence, we must view happenings to beings other than ourselves only in the capacity in which they help to build ourselves. The fact that the suffering of an innocent victim serves to bolster our personality is sufficient. The independent suffering of the external individual cannot be verified.
Nietzche has criticized Christian theology for placing mankind in a state of guilt for the original sin, Iqbal had pointed out that this concept of original sin is absent in Islam, and that the Quran encouraged a positive self image of the self or man. Many modern Christian theologians also adopt this view.