Wow, talk about a deep question! I wonder what the background of the question is? It is a very philosophical question and I will give you my "take" on the subject.
The Bible actually says very little about Satan and where he came from. There are hints given and references made that have caused many to believe:
1. The angelic creation preceded the creation of the physical universe recorded in Genesis 1. There are indications in the Psalms and other places that indicate that "the sons of God", a common name given to angels, were present when Genesis 1 took place.
2. The angelic creation seems to have been given a period during which they could choose to obey God or not.
3. Satan and others decided to rebel against God. Jude 6 refers to "angels who kept not their first estate." This is believed to be a reference to Satan and his "followers."
4. If you think about the situation of the angels being in the very presence of God and still choosing to rebel you are beginning to see why it was such a problem. If you can rebel in the very face of God there is no hope for you.