This is a two-part question. The first part is “Did God know Satan would rebel?” We know from Scripture that God is omniscient, which literally means “all-knowing.” Job 37:16; Psalm 139:2–4, 147:5; Proverbs 5:21; Isaiah 46:9-10; and 1 John 3:19–20 leave no doubt that God’s knowledge is infinite and that He knows everything that has happened in the past, is happening now, and will happen in the future.
Looking at some of the superlatives in these verses—“perfect in knowledge”; “his understanding has no limit”; “he knows everything”—it is clear that God’s knowledge is not merely greater than our own, but it is infinitely greater. He knows all things in totality. If God’s knowledge is not perfect, then there is a deficiency in His nature. Any deficiency in God’s nature means He cannot be God, for God’s very essence requires the perfection of all His attributes. Therefore, the answer to the first question is “yes, God knew that Satan would rebel.”
Moving on to the second part of the question, “Why did God create Satan knowing ahead of time he was going to rebel?” This question is a little trickier because we are asking a “why” question to which the Bible does not usually provide comprehensive answers. Despite that, we should be able to come to a limited understanding. We have already seen that God is omniscient. So, if God knew that Satan would rebel and fall from heaven, yet He created him anyway, it must mean that the fall of Satan was part of God’s sovereign plan from the beginning. No other answer makes sense given what we’ve seen thus far.
First, we should understand that knowing Satan would rebel is not the same thing as making Satan rebel. The angel Lucifer had a free will and made his own choices. God did not create Lucifer as the devil; He created him good (Genesis 1:31).
In trying to understand why God created Satan, knowing he would rebel, we should also consider the following facts:
1) Lucifer had a good and perfect purpose before his fall. Lucifer’s rebellion does not change God’s original intent from something good to something bad.
2) God’s sovereignty extends to Satan, even in his fallen condition. God is able to use Satan’s evil actions to ultimately bring about God’s holy plan (see 1 Timothy 1:20 and 1 Corinthians 5:5).
3) God’s plan of salvation was ordained from eternity past (Revelation 13:8); salvation requires something to be saved from, and so God allowed Satan’s rebellion and the spread of sin.
4) The suffering that Satan brought into the world actually became the means by which Jesus, in His humanity, was made the complete and perfect Savior of mankind: “In bringing many sons and daughters to glory, it was fitting that God, for whom and through whom everything exists, should make the pioneer of their salvation perfect through what he suffered” (Hebrews 2:10).
5) From the very beginning, God’s plan in Christ included the destruction of Satan’s work (see 1 John 3:8).
Ultimately, we cannot know for sure why God created Satan, knowing he would rebel. It’s tempting to assume that things would be “better” if Satan had never been created or to declare that God should have done differently. But such assumptions and declarations are unwise. In fact, to claim we know better than God how to run the universe is to fall into the devil’s own sin of promoting himself above the Most High (Isaiah 14:13–14).