From the outset, we should point out that this is an issue in which the world's greatest minds have applied themselves, and on account of which many people have lost their way. The Prophet's Companions did not speak about questions of free will and determinism. They did not need to, because their faith was so strong and left no room for the types of doubts to take root which instigate this line of thinking.
At the same time, we say that the pillars of faith our Prophet (peace be upon him) described to us are six. They are to believe in Allah, His angels, His Books, His Messengers, the Last Day, and finally divine decree – both the good and the bad that befalls of it.
Faith in divine decree has four dimensions:
1. Knowledge. We believe that Allah knows all things. He knows what has take place and what will take place with His eternal and constant knowledge. He does not come to know these things after having not known them, nor is He subjected to forgetfulness.
2. The record. We believe that Allah has written in the Preserved Tablet everything that will ever exist until the Day of Resurrection. Allah says: "Do you not know that Allah knows what is in the heaven and the Earth? Surely this is in a Record; surely this is easy to Allah. " [Sûrah al-Hajj: 70]
3. Allah's Will. We believe that Allah has willed everything that takes place in the heavens and on Earth. Whatever He wills to happen must come to pass. Whatever He does not will to happen will never take place.
4. Creation. We believe that "Allah is the Creator of all things, and He is the Guardian and Disposer of all affairs. To Him belong the keys of the heavens and the Earth." [Sûrah al-Zumar: 62-63]
These four dimensions of faith are everything we believe about Allah regarding the questions of divine decree and divine will, and they also clarify to us what agency remains for His creatures. In other words, everything that human beings say, do, or refrain from, all of it is known to Allah, recorded in the Tablet, willed by Allah and created by Him.
Allah says: "For whoever among you who wills to go straight. And you do not will except that Allah wills, the Lord of the worlds." [Sûrah al-Takwîr: 28-29]
Allah says: "Allah created you and what you do." [Sûrah al-Sâffât: 96]
We believe in these aspects of Allah's decree. We also believe that Allah has given us free will, and we freely choose our actions. This is clearly established in the Qur'ân, as follows:
1. Allah attests to our will. For instance, He says: "Go to your tillage how you will." [Sûrah al-Baqarah: 223] He says: "If they had willed to go forth, they would have prepared provisions for it." [Sûrah al-Tawbah: 46]
2. Allah commands us. The fact that Alllah directs commands and prohibitions at us makes sense only if we are free to comply. Otherwise, we would be commanded to do that which is outside of our capacity, since our compliance or non-compliance would be predetermined. Therefore, it makes no sense make demands of entities that have no ability to comply with those commands. Furthermore, Allah says: "Allah burdens no soul except with that which it can do." [Sûrah al-Baqarah: 286]
3. Allah praises and censures. He praises those who do good for the good that they do and censures evildoers for the bad things that they do. He also gives recompense to us on account of our deeds. This only makes sense if we carried out those deeds of our own volition. Otherwise there would be nothing to reward or punish.
4. Allah sent messengers to establish His proof upon creation. The Messengers are: "…givers of glad tidings and warners, so that humanity would have no argument against Allah after the messengers." [Sûrah al-Nisâ': 165] If people were not free in their choices, their argument against Allah – that they had no guidance – would not become invalid after Allah sent the Messengers, since if they were compelled in their actions, it would make no difference whether or not they received guidance.
Finally, we have practical, a priori knowledge that we carry out actions by our own will and choice. We decide what to do and what to abstain from, without any sense of being compelled in our decisions. This applies to even the smallest of willful actions, like sitting and standing, entering our homes and departing, as well as more substantial decisions like marriage and divorce or deciding to relocate to another city. This is why we feel it most acutely if someone else tries to force us to do something we do not want to do. And this is also why Allah does not hold us legally accountable for what we do under compulsion.
Responsibility for our deeds
A sinner cannot argue that he or she was "fated" to commit a sin, since that sin was carried out by the sinner's free choice. Yes, Allah knew in His eternal knowledge that the sinner was going to perpetrate that particular sin at that particular time and willed to allow it to happen, but He did not force the sinner to make that choice. Moreover, we only come to know that it was written fro the sinner to commit the sin afterwards. This is why Allah says: "No soul know what it will earn on the morrow." [Sûrah Luqmân: 34]
How can we make excuses for our actions with that which he had no knowledge beforehand? This is why Allah says: "Those who are idolaters will say: 'Had Allah willed, we had not ascribed (unto Him) partners neither would have our fathers, nor had we forbidden aught.' Thus did those who were before them give the lie (to Allah's messengers) till they tasted of Our wrath. Say: Have you any knowledge that you can adduce for Us? Lo! you follow naught but conjecture. Lo! you do but lie. " [Sûrah al-An`âm: 148]
In our actions, we are both free and under Allah's determination at the same time. Since Allah creates our actions and wills that we act, to that extent our actions are under His determination. But since we choose on our own which actions we wish to carry out – a choice which Allah has willed to give us – then we are free in our choices and earn the good or bad thereof.
And Allah knows best.