How did God harden Pharaoh's heart?
It seems unfair that God would harden Pharaoh's heart and then get mad at him for having a hard heart.
I'm not sure we have a good grasp of what it meant for Pharaoh to have a hard heart or that we really understand what God's part in it was, but I'll take a shot at an answer.
First, I don't believe that God's nature would allow him to force someone to sin or to go against His will. Satan doesn't have that power either, by the way. The expression "The devil made me do it..." is a cop out. The devil can't make you sin or go against God's will. He can make bad things look desirable. He does that all the time. But the actual choice remains up to you as to whether you stay on God's path or go astray.
So when the Bible says that Pharaoh hardened his heart, I understand this to be the leader of the country making a conscious decision that he didn't want to lose his slave labor and refusing to do what God wanted him to do. The desire to do wrong was already there, and it looked preferable to obedience to God both in terms of his economy, his belief system in his gods versus the God of the Israeli people, and his belief in his own position of power both in the religious system of Egypt and as head of government in general. He had no desire to see the status quo change, because he was the direct recipient of the benefits of the status quo.
So what part can God be said to play when it says that God hardened Pharaoh's heart. I believe that this statement reflects a removal of the Holy Spirit from acting any more as the force trying to get Pharaoh to take the right path. The Bible declares that the only sin that cannot be forgiven is blaspheming the Holy Spirit (Matthew 12:31). It isn't that God won't forgive, but once the influence of the Holy Spirit is removed which strives with man's heart to do right, there is no more restraint against evil in that individual and no more desire to seek that which is right. Proverbs 29:1 also speaks to a limit to God's dealing with man in that continual hardening of the heart will eventually lead to being cut off without remedy.
So my sense of God hardening Pharaoh's heart is simply that God stopped trying to keep Pharaoh from going down the wrong path. History is littered with individual who rose to great power and did dramatically evil deeds. Some with help, and some alone. Pharaoh was not the first and will not be the last. Pray that God never tells the Holy Spirit to go ahead and leave you alone because He has reached His limit with you.