From Ligonier Ministries:
Martin Luther struggled greatly with the relationship of God’s sovereignty to human free will and sin. In fact, one of the greatest books ever written on the subject, The Bondage of the Will, is from Luther’s pen. When Luther grappled with this issue, he especially struggled with the Old Testament passages where we read that God hardened Pharaoh’s heart (Ex. 4:21; 7:3–4, 13–14, 22–23; 8:15, 19, 30–32; 9:27–10:2; 10:16–20, 24–28).
When we read these passages, we tend to think, “Doesn’t this suggest that God not only works through the desires and actions of humans, but that He actually forces evil upon people?” After all, the Bible does say that God hardened Pharaoh’s heart.
When Luther discussed this, he observed that when the Bible says that God hardened the heart of Pharaoh, God did not create fresh evil in the heart of an innocent man. Luther said that God didn’t harden people by putting evil in their hearts. All that God must do to harden anyone’s heart is to withhold His own grace; that is, He gives a person over to himself.