Allah SWT created humans free willed and gave them the ability to choose their path. Although some have said that humans in their path are predestined but think that they are free willed, there is plenty of evidence to point to the free will of mankind, for which some will be presented below:
A) Every person who needs to make a choice where this doubt and hesitation in going ahead with that decision needs to go through a thought process as to whether or not to go ahead? That very hesitation is evidence of free will and the ability to or to refrain from doing something.
B) People are sometimes critical of the works of others, and that criticism in itself points to the fact that one can either act upon or refrain from acting upon a task.
C) Every person has done or said something that they have later regretted. That regret points to the ability to have not committed that act or said those words and therefore the free will to have refrained from doing so, which is why one then says “Oh how I wish I had not done or said that!”
D) All people raise their own children to the best of their ability and/or send them to mentors and tutors, indicating that one can move away from the wrong path and steer towards the right path.
Therefore, hesitation and doubt, criticism, regret and upbringing point to the reality of free will. Not only is free will for humans but also granted to animals. If you cage a cat and give it all kinds of food inside the cage to eat, it will prefer being out roaming the streets and have the simplest of foods rather than to be stuck inside the cage.
In heaven too, had there been no freedom, the faithful would have faced difficulties and discomfort, so we read in the Qur’an that when they enter heaven they thank Allah SWT for their freedom:
ٱلْحَمْدُ لِلَّـهِ ٱلَّذِى صَدَقَنَا وَعْدَهُۥ وَأَوْرَثَنَا ٱلْأَرْضَ نَتَبَوَّأُ مِنَ ٱلْجَنَّةِ حَيْثُ نَشَآءُ
"Praise be to Allah, Who has truly fulfilled His Promise to us, and has given us (this) land in heritage: We can dwell in the Garden as we will.”1
Taken all of the above in to consideration, mankind is a servant of Allah SWT and must abide by the divine laws imposed upon him. And if the boundaries of freedom are not adhered to and choose to follows their own whims and fantasies, or those of others, they will be doomed in to the valley of destruction.
Freedom must be within the frame work of Divine Laws and intellect so that the deprivation of the freedom of others does not occur.