"Where did the devil come from?" is a question I've often heard as a pastor. Or, it is sometimes phrased this way: "How could a God of love create someone as horrible as the devil?" We just can't understand why God would make such a creature.
First of all, let me say that God did not create someone as horrible as the devil. The devil became
this way. He made a deliberate choice that turned him into what he is today: an intelligent, wicked, spiritual being who is bent on the destruction of humanity
In fact, I find it interesting to read in the first chapter of Genesis that God saw everything He had made and it was good (see Genesis 1:31). So apparently at that point, all the angels were still under God's direction. There was no rebellion.
But then in Genesis 3, we see the Serpent, or Satan, tempting Eve. Something drastic happened between Genesis 1 and Genesis 3. This once high-ranking, beautiful angel known as Lucifer rebelled against God. You see, Lucifer was not satisfied with worshipping God. He himself wanted to be worshipped. So he lost his former, exalted position in Heaven. Lucifer, by the way, means "son of the morning," which he was. But Satan means "accuser," which he is. So Lucifer became Satan when he fell.
He lived with God in Heaven, but because of his bad choice, his destination is a bottomless pit and a lake of fire and brimstone forever.