Your question is really good and it is indicating that you've got a good intellect. You want to know that if God is exalted in might and He can do everything then what the reason of giving us free will was while He already knew that who would go to hell and who will go to heaven.
In fact, you've little misunderstood it. God is all powerful and as you know everyone who has some power or authority he likes to share and show his powers. Similarly God who is exalted in might and wisdom wanted that there should be some creature that will know him by its own thinking. That is the reason God has given us free will. Moreover, God has also given us the choice to choose the right or wrong way. I meant to say that nobody will go to hell if he wants to go to heaven. Just he needs to perform the acts and deeds which are necessary for going in the heaven.
And another misunderstanding you've created is that we would go to hell after death. No dear! It is not the case, first of all, on the doomsday we would be accountable for our deeds then after reckoning of that who has got the good account he would go to heaven and in the other case, that person will go to hell. And this is what all monotheist religions teach.
In fact, you've little misunderstood it. God is all powerful and as you know everyone who has some power or authority he likes to share and show his powers. Similarly God who is exalted in might and wisdom wanted that there should be some creature that will know him by its own thinking. That is the reason God has given us free will. Moreover, God has also given us the choice to choose the right or wrong way. I meant to say that nobody will go to hell if he wants to go to heaven. Just he needs to perform the acts and deeds which are necessary for going in the heaven.
And another misunderstanding you've created is that we would go to hell after death. No dear! It is not the case, first of all, on the doomsday we would be accountable for our deeds then after reckoning of that who has got the good account he would go to heaven and in the other case, that person will go to hell. And this is what all monotheist religions teach.