What is the biblical basis for free will? I have seen several responses to theodicy questions revolving around the concept of "free will."  I am not familiar with any self-contained biblical basis for this belief (that is, no extra-biblical support is required to defend the position).

I am aware that there are several variations of the doctrine of "free will," so I would like to limit answers to "free will" defined as:


the ability of people to make their own choices (no predestination)
applicable to everyone (not limited to groups such as the redeemed)
applicable throughout time (not just before the fall; still applicable today)
Although the Bible does contain a certain amount of direct, doctrinal teaching, much of its teaching comes in the form of stories. In the Old Testament, there are the various narratives of people and nations and their actions, both good and bad. In the New Testament, there is the story of the life of Jesus and of the people who surround him, who do things both good and bad. And much of Jesus' own teaching is in the form of parables, or stories, rather than direct doctrinal style teaching.
We should therefore not expect the Bible to present a theological discourse on free will. Rather, the biblical basis for free will is found largely in the various stories and how they unfold.
Explicit and semi-explicit statements of freedom of choice in the Bible
Having said that, there is at least one passage that explicitly presents humankind as having a choice between good and evil:

See, I set before you today life and prosperity, death and destruction. For I command you today to love the Lord your God, to walk in obedience to him, and to keep his commands, decrees and laws; then you will live and increase, and the Lord your God will bless you in the land you are entering to possess.
But if your heart turns away and you are not obedient, and if you are drawn away to bow down to other gods and worship them, I declare to you this day that you will certainly be destroyed. You will not live long in the land you are crossing the Jordan to enter and possess.
This day I call the heavens and the earth as witnesses against you that I have set before you life and death, blessings and curses. Now choose life, so that you and your children may live and that you may love the Lord your God, listen to his voice, and hold fast to him. For the Lord is your life, and he will give you many years in the land he swore to give to your fathers, Abraham, Isaac and Jacob. (Deuteronomy 30:15–20, italics added)

In this passage, God gives the Children of Israel (long after the Fall) an explicit choice between good and evil, asking them to choose life.
Somewhat less explicitly, in the Book of Revelation:

Here I am! I stand at the door and knock. If anyone hears my voice and opens the door, I will come in and eat with that person, and they with me. (Revelation 3:20)

This passage clearly implies freedom on the part of the human being either to open the door and let the Lord in or not to open the door and leave the Lord outside. This statement occurs in the New Testament, in the final book of the Bible, almost as far after the Fall as the Bible story goes.
Stories in which people are presented as having choice and free will
There are other passages in the Bible that can be read as saying that people have a choice between good and evil, or what is the same, a choice between accepting and following God and not accepting and following God.
However, the most extensive biblical basis for free will comes in the narrative itself. In many stories in the Bible, God gives a direction or a commandment, and the people to whom it is given choose not to follow it. The fact that in these stories God does not prevent people from acting against God's will illustrates the principle that people do have real choice and free will.
Of course, in many stories in the Bible God gives instructions or commandments, and the people to whom they are given do follow them. This supports the principle that it is up to the human beings whether or not to act according to God's will.
Here are some of the stories throughout the Bible in which God gives instructions or commandments and people choose not to obey them:
Adam and Eve
In Genesis 2 we read:

Now the Lord God had planted a garden in the east, in Eden; and there he put the man he had formed. The Lord God made all kinds of trees grow out of the ground—trees that were pleasing to the eye and good for food. In the middle of the garden were the tree of life and the tree of the knowledge of good and evil. . . .
The Lord God took the man and put him in the Garden of Eden to work it and take care of it. And the Lord God commanded the man, “You are free to eat from any tree in the garden; but you must not eat from the tree of the knowledge of good and evil, for when you eat from it you will certainly die.” (Genesis 2:8–9, 15–17)

Here God places in the Garden of Eden two trees, one of which he says the people he has created may eat from, and the other of which he says they are not to eat from. Clearly, God is giving Adam (and later) Eve, free will and a choice, or God would not have put these two trees in the Garden.
And yet, in the very next chapter, first Eve, then Adam, eat from the tree of the knowledge of good and evil knowing that God has told them not to. Eve and Adam, not to mention the serpent, then reap the consequences of their choice to disobey God. In this story, told in Genesis 3, God does not prevent Adam and Eve from eating from the forbidden tree. Clearly they are free to do so. And then they must live with the results of their choice.
This, of course, led to the Fall of Humankind.
And yet, even after the Fall, in the Bible story human beings continue to be given a choice between good and evil actions, and to reap the benefits or to experience the negative consequences of their choices, without God intervening to prevent them from making the wrong choice.
Cain
In fact, the very next such story involves Adam and Eve's firstborn son Cain. You can read the full story in Genesis 4:1–16. Here is the most relevant excerpt:

Then the Lord said to Cain, &quot;Why are you angry? Why is your face downcast? If you do what is right, will you not be accepted? But if you do not do what is right, sin is crouching at your door; it desires to have you, but you must rule over it.&quot;
Now Cain said to his brother Abel, &quot;Let's go out to the field.&quot; While they were in the field, Cain attacked his brother Abel and killed him. (Genesis 4:6–8)

In the story Cain is angry because God has accepted the offering of his brother Abel but not his own offering. God remonstrates with Cain, telling him to overcome the sin that is crouching at his door. But Cain does not listen to God, and instead yields to that sin and kills his brother Abel out of jealousy.
God did not prevent Cain from doing this. Cain was free to carry out his choice to yield to his jealousy and anger even after God pleaded with him not to do so. And Cain had to live with the consequences of his evil choice, as narrated in the rest of the story.
The Children of Israel at Mt. Sinai
Moving on to the book of Exodus, the Children of Israel heard God's own voice proclaiming the Ten Commandments from Mt. Sinai, among which was the commandment not to worship idols. The Deuteronomy version concludes the giving of the Ten Commandments by saying:

These words the Lord spoke with a loud voice to your whole assembly at the mountain, out of the fire, the cloud, and the thick darkness, and he added no more. (Deuteronomy 5:22)

So it is clear that the people heard God himself telling them not to worship idols.
And yet, during the forty days that Moses was then up on the mountain receiving additional laws and commandments from God, we read:

When the people saw that Moses delayed to come down from the mountain, the people gathered around Aaron, and said to him, &quot;Come, make gods for us, who shall go before us. As for this Moses, the man who brought us up out of the land of Egypt, we do not know what has become of him.&quot;
Aaron said to them, &quot;Take off the gold rings that are on the ears of your wives, your sons, and your daughters, and bring them to me.&quot; So all the people took off the gold rings from their ears, and brought them to Aaron. He took the gold from them, formed it in a mold, and cast an image of a calf.
Then they said, &quot;These are your gods, O Israel, who brought you up out of the land of Egypt!&quot;
When Aaron saw this, he built an altar before it; and Aaron made proclamation and said, &quot;Tomorrow shall be a festival to the Lord.&quot; They rose early the next day, and offered burnt offerings and brought sacrifices of well-being; and the people sat down to eat and drink, and rose up to revel. (Exodus 32:1–6)

In other words, in less than a month and a half from the time that the people heard God's own voice booming the Ten Commandments from the mountain, they broke the commandments against having no other God before him, against making and worshiping idols, and probably several other commandments as well.
Once again, God did not prevent them from doing so. They remained free to break God's commandments, but then had to take the consequences of their actions, as narrated in the rest of Exodus 32.
Solomon and his wives
Moving on to the time of the kings of Israel, King Solomon, son of King David, also violated several of God's commandments, specifically, in taking foreign wives and in building shrines to their gods, as we read in 1 Kings:

King Solomon, however, loved many foreign women besides Pharaoh’s daughter—Moabites, Ammonites, Edomites, Sidonians and Hittites. They were from nations about which the Lord had told the Israelites, “You must not intermarry with them, because they will surely turn your hearts after their gods.” Nevertheless, Solomon held fast to them in love. He had seven hundred wives of royal birth and three hundred concubines, and his wives led him astray. As Solomon grew old, his wives turned his heart after other gods, and his heart was not fully devoted to the Lord his God, as the heart of David his father had been. He followed Ashtoreth the goddess of the Sidonians, and Molek the detestable god of the Ammonites. So Solomon did evil in the eyes of the Lord; he did not follow the Lord completely, as David his father had done.
On a hill east of Jerusalem, Solomon built a high place for Chemosh the detestable god of Moab, and for Molek the detestable god of the Ammonites. He did the same for all his foreign wives, who burned incense and offered sacrifices to their gods. (1 Kings 11:1–8)

Even though Solomon, who was the king of all Israel, was clearly and flagrantly breaking God's explicit commandments, God did not prevent Solomon from doing so. Rather, God pronounced the consequences of Solomon's actions in the next series of verses: 1 Kings 11:9–13. These consequences were that Solomon's son would have most of the kingdom taken away from him, tarnishing and diminishing Solomon's legacy.
The crucifixion of Jesus
In the New Testament, a prime example of human free will is in the fact that the Jewish religious leaders of the day were allowed to sentence Jesus to death, and that the Romans were allowed to carry out that sentence by crucifying Jesus.
God did not prevent this, but allowed human beings to crucify the Son of God. Yes, this was also part of God's plan. And yet, the people who crucified Jesus were acting for their own reasons, out of their own choice, in order to preserve (as they thought) their own power and position.
However, before that happened, Jesus had already presented sin and repentance as a choice in many of his teachings and parables. Here are just two examples:
If a member of the church sins against you

If another member of the church sins against you, go and point out the fault when the two of you are alone. If the member listens to you, you have regained that one. But if you are not listened to, take one or two others along with you, so that every word may be confirmed by the evidence of two or three witnesses. If the member refuses to listen to them, tell it to the church; and if the offender refuses to listen even to the church, let such a one be to you as a Gentile and a tax collector. Truly I tell you, whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven. (Matthew 18:15–18)

Here Jesus tells us that if someone sins, we are to take various steps to get them to admit to it and change their ways. And yet, that person may or may not listen. And Jesus concludes by saying that whatever we bind on earth will be bound in heaven, and whatever we loose on earth will be loosed in heaven. In the context of the teaching, he is saying that whatever choice we make here on earth, that choice will continue to be in effect in the afterlife.
The Parable of the Ten Minas
In the Parable of the Ten Minas as told in Luke 19:11–27 (a variation of this parable also occurs in Matthew 25:14–30), a nobleman entrusts ten of his servants with ten minas, telling them:

Put this money to work until I come back. (Luke 19:14)

The first two do as they are commanded, and make a tenfold or fivefold profit. The third, however, does not do as he is told:

Then another servant came and said, &quot;Sir, here is your mina; I have kept it laid away in a piece of cloth. I was afraid of you, because you are a hard man. You take out what you did not put in and reap what you did not sow.&quot; (Luke 19:20–21)

Because he did not do what his master told him to do, he was punished by having the money confiscated from him instead of being rewarded by being put in charge of ten or five cities, as had happened to the first two servants, who had done what their master told them to do.
In this parable, the master, who is clearly a figure representing God, entrusts money to his servants, gives them a command, and then allows them to handle the money as they see fit. Those who handle it well as commanded are rewarded, and those who do not are punished.
And once again, the master, representing God, does not intervene to prevent them from acting contrary to his will, but rather gives them freedom to choose to obey or not to obey, and to reap the reward or the punishment for their actions.
Passages supporting the principle that all people have free will
Though none of these stories imply that free will is not available to any class of people, such as the evil vs. the good or the unredeemed vs. the redeemed, or Christians vs. non-Christians, there are several passages in the Bible that build an increasing case that all people have free will.
Ezekiel 18
In Ezekiel 18, God pronounces an end to the practice, common in many ancient cultures, including the Hebrew culture, of whole families being punished for the sins of the head of the household.
God then says that &quot;the one who sins is the one who will die&quot; (Ezekiel 18:4), establishing individual responsibility for a person's good or evil choices and behavior, and individual consequences for that behavior.
The chapter then goes into detail saying that if a man is righteous and does what is good, he will live. But if that man's son does what is evil and violent, that son will die for his sins. But if that man's son sees what his father has done, and instead does is good and right instead, he will live.
The chapter ends with these words:

Therefore I will judge you, O house of Israel, all of you according to your ways, says the Lord God. Repent and turn from all your transgressions; otherwise iniquity will be your ruin. Cast away from you all the transgressions that you have committed against me, and get yourselves a new heart and a new spirit! Why will you die, O house of Israel? For I have no pleasure in the death of anyone, says the Lord God. Turn, then, and live. (Ezekiel 18:30–32)

In this chapter, God establishes individual responsibility for one's own sins or good behavior, and calls on people to repent from evil behavior and do what good instead, so that they may live instead of dying.
This is once again a clear presentation of a choice between good and evil on the part of the human being. And it rests that choice squarely on the shoulders of each individual human being.
The Sheep and the Goats
Turning to the New Testament, Jesus' final teaching in the Gospel of Matthew before the events of Holy Week is his account of the Sheep and the Goats, or the Judgment of the Nations, as told in Matthew 25:31–46. It opens with these words:

When the Son of Man comes in his glory, and all the angels with him, he will sit on his glorious throne. All the nations will be gathered before him, and he will separate the people one from another as a shepherd separates the sheep from the goats. He will put the sheep on his right and the goats on his left. (Matthew 25:31–33, italics added)

Note that Jesus states that all the nations, not any one specific nation or group, will be called before the Son of Man. He is speaking of a universal judgment on all people.
He then proceeds to say, in narrative form, that people who have done good things for him by doing good things for their fellow human beings who are in need will go to eternal life, but people who have not done good things for him by not doing good things for their fellow human beings who are in need will go to eternal punishment.
All of the preceding passages from the Bible show that whether or not we follow God's commandments and do good things for our fellow human beings is a choice on our part. This passage in the Gospels extends that principle to all the nations, meaning to everyone on earth.
God's Righteous Judgment
Finally, moving on to the Epistles, Romans 2:1–15 also speaks of the judgment that God will execute on all people. Within that passage Paul says:

For he will repay according to each one's deeds: to those who by patiently doing good seek for glory and honor and immortality, he will give eternal life; while for those who are self-seeking and who obey not the truth but wickedness, there will be wrath and fury. There will be anguish and distress for everyone who does evil, the Jew first and also the Greek, but glory and honor and peace for everyone who does good, the Jew first and also the Greek. For God shows no partiality. (Romans 2:6–11, italics added)

And immediately following this:

All who have sinned apart from the law will also perish apart from the law, and all who have sinned under the law will be judged by the law. For it is not the hearers of the law who are righteous in God's sight, but the doers of the law who will be justified. When Gentiles, who do not possess the law, do instinctively what the law requires, these, though not having the law, are a law to themselves. They show that what the law requires is written on their hearts, to which their own conscience also bears witness; and their conflicting thoughts will accuse or perhaps excuse them on the day when, according to my gospel, God, through Jesus Christ, will judge the secret thoughts of all. (Romans 2:12–16, italics added)

In this passage, Paul explicitly applies the final judgment to Jews, &quot;Greeks&quot; (pagan polytheists), and Gentiles, by which he likely means non-Jews and non-Christians, even though technically it means non-Jews. These general terms cover all the groups of people that existed in Paul's world. And he says that all of these classes of people will be judged for eternal life or for wrath and fury according to their righteous or unrighteous actions, and that this will be done by God, through Jesus Christ.
Paul, then, explicitly applies to all people what Jesus applied to &quot;all the nations&quot; in Matthew 25:31–46, as referenced above.
These passages, taken together with the others, provide the biblical basis for the belief that this freedom to choose between good and evil is not limited to particular groups such as the redeemed (however they are defined), but extends to people of all groups and all nations.
Summary and conclusion
Deuteronomy 30:15–20 states explicitly that God sets before us a choice between obeying or disobeying God. The same choice is strongly implied in Revelation 3:20, which says that Christ knocks on the door, and comes in only if we open the door for him.
There are also many stories in the Bible that provide examples of human beings both before and after the Fall being given choices between good and evil, and then experiencing the good or bad consequences of their choices and actions. The ones mentioned above are just a few among dozens, if not hundreds of such stories in the Bible. In these stories people sometimes choose the good path, and other times they choose the evil path.
Finally, among other passages that could be quoted, Ezekiel 18, Matthew 25:31–46, and Romans 2:1–16 establish individual responsibility for good and evil choices and actions, and extend the judgment and reward or punishment for those choices and actions to all the nations, including Jews, &quot;Greeks,&quot; and Gentiles.
All of this provides a solid basis in the Bible for the belief that:

Humans are not predestined, but have the ability to make their own choices.
This applies to all groups, both the good and the evil, both the redeemed and the unredeemed.
Humans have this ability throughout time, both before and after the Fall.