Pharaoh had come to a place in his life where he was no longer interested in being a good person with an active conscience so God withdrew His Spirit and that 'still small voice' that directs our life when we listen and Pharaoh was allowed to harden himself (his heart) against God and show no mercy towards his slaves. There are many instances in Scripture where this happened and the results were always disastrous. It is a warning to us all that to reject the Holy Spirit puts our Salvation in jeopardy.
"And remember, when someone wants to do wrong it is never God who is tempting him, for God never wants to do wrong and never tempts anyone else to do it." (James 1:13) Living Bible The apostle Paul's discussion of God's with Pharaoh is often incorrectly understood to mean that God arbitrarily hardens the heart of individuals according to his foreordained purpose, without regard for the individual's prior inclination or heart attitude. The sense of the texts involving Pharaoh is that "God" permitted Pharaoh to harden his own Heart---spared---him---gave him the opportunity, the occasion of working out the wickedness that was in him. That is all. As the scripture in James 1:13 says :"God never wants to do wrong." Have more information on this subject if its still not clear. It comes down to it that Pharaoh himself "hardened his heart" made his heart unresponsive. The repeated opportunities given Pharaoh, to make decisions and in doing so he became hardened in his attitude. It's like telling a child to do something he does not want to do, in the end he blames you for it. And, it was you that made his heart hardened.