The simple answer is that God did to Pharaoh what Pharaoh first did to himself. As you read through the plagues, notice how, in the first 5 plagues, Pharaoh hardened his own heart:
-Exod. 7:13-14, "Still Pharaoh’s heart was hardened, and he would not listen to them, as the LORD had said. Then the LORD said to Moses, “Pharaoh’s heart is hardened; he refuses to let the people go."
-Exod. 7:22, "But the magicians of Egypt did the same by their secret arts. So Pharaoh’s heart remained hardened, and he would not listen to them, as the LORD had said.
-Exod. 8:19, "Then the magicians said to Pharaoh, “This is the finger of God.” But Pharaoh’s heart was hardened, and he would not listen to them, as the LORD had said.
Then, about halfway through, we begin to hear of how God hardened the heart of Pharaoh:
Exod. 9:12; 10:20; 10:27; 11:10, "But the LORD hardened Pharaoh's heart...."
God confirmed what Pharaoh began. In the language of Romans 1, God “handed Pharaoh over” to his sins.