"And the LORD said to Moses, 'When you go back to Egypt, see that you do all those wonders before Pharaoh which I have put in your hand. But I will harden his heart so that he will not let the people go. Then you shall say to Pharaoh, "Thus says the LORD: 'Israel is My son, My firstborn. So I say to you, let My son go that he may serve Me. But if you refuse to let him go, indeed I will kill your son, your firstborn'"'" (4:21-23). The words of God here are much more than a threat to the leader of Egypt; they are prophetic! Pharaoh would refuse and he would lose his firstborn son because of his extreme stubbornness. It also may be that God wanted to strengthen Moses and prepare him for the opposition he would soon encounter. Additionally, God's words here imply the eventual inclusion of the Gentiles into His family (though they would not be the "firstborn").
This passage also contains the first explicit reference to Pharaoh's heart. God affirmed that He would harden it (e.g., 7:3; 9:12; 10:20). Elsewhere, we can find examples where Pharaoh is said to harden his own heart (e.g., 8:15,32; 9:34). In still other verses, it is unclear as to who did the hardening (e.g., 7:13,22; 8:19; 9:7). Since Pharaoh's hard heart is mentioned over 20 times in Exodus, and a number of those references state that it was God who hardened the Egyptian leader, it would benefit us to briefly explore the question: Did God, by means of continually hardening Pharaoh's heart, force him to reject the divine will? If so, isn't God partially to blame for Pharaoh's rebellion?
My understanding is that God's foreknowledge is complete (cf. Isa. 46:9,10). However, merely because He knows what a person will chose in a certain scenario does not mean that He forced it. Foreknowledge of a choice someone will make does not negate that person's free will. But, why then does the text say that God hardened Pharaoh's heart?
The best explanation to this I have ever heard makes use of an analogy. If you put a stick of butter outside and the sun shines on it, it will melt. However, if you put clay outside, the sun shining on it will harden it. So, the sun hardens the clay but softens the butter. Did the sun shine differently upon one of these elements? Of course not. Then why was there a different result? The answer: the materials themselves were different! And so it was with Pharaoh's heart in contrast with the hearts of his servants (e.g., 10:7). They eventually softened, but Pharaoh did not yield until he was broken (like hardened clay that has been smashed on the pavement). Each time that Pharaoh was confronted with the word of God, he became harder and harder (like the clay sitting outside in the sun), but some become softer (like the butter) after repeated exposure to the word of God. Thus, opposite effects can be produced by the same power. God's longsuffering leads the soft-hearted to repentance but the hard-hearted to further rebellion. This can be seen in the early church as well. Although thousands obeyed the gospel, many more did not. The message was the same for all but the reception was based on the condition of each person's heart and what they're made of, so to speak. So, we can easily understand how it can be said that the sun melted the butter or hardened the clay just as it can be said that God hardened Pharaoh's heart while pricking other hearts to repentance. God is not a respecter of persons (cf. Acts 10:34); He wants all to repent and be saved (cf. Eze. 33:11; II Pet. 3:9). But, when a person chooses to be more like clay and less like butter, God is not to blame for the hardening of that person's heart when He repeatedly presents His truth to an evil mind (cf. John 12:40). And it is true that the continual presentation of the truth will irritate, enrage, and further harden a wicked heart (without any supernatural force or influence). This, I believe, explains the hardening of Pharaoh's heart, and God's innocence in the matter.