Origin of evil

The origin of evil can be traced back to the first book of the Bible, the book of Genesis.

Eden
The book of Genesis tells of an Opposer of God who showed up in the garden of Eden. He is described as “the serpent,” but he was not a mere animal. The last book of the Bible identifies him as “the one called Devil and Satan, who is misleading the entire inhabited earth.” He is also called “the original serpent.” (Genesis 3:1; Revelation 12:9) This powerful angel, or invisible spirit creature, used a serpent to speak to Eve, even as a skilled person can make it seem that his voice is coming from a nearby doll or dummy. That spirit person had no doubt been present when God prepared the earth for humans (Job 38:4, 7).

Perfect
Since all of God Jehovah’s (See Divine Name) creations are perfect, however, who made this “Devil,” this “Satan”? One of the powerful spirit sons of God turned himself into the Devil. As an analogy, today a person who was once decent and honest may become a thief by allowing a wrong desire to develop in his heart. If he keeps thinking about it, that wrong desire may become very strong. Then if the opportunity presents itself, he may act upon the bad desire that he has been thinking about (James 1:13-15).

Desire
A powerful spirit son of God became Satan the Devil who apparently heard God tell Adam and Eve to have children and to fill the earth with their offspring (Genesis 1:27, 28). Satan may have thought: ‘Why, all these humans could worship me rather than God!’ So a wrong desire built up in his heart. Eventually, he took action to deceive Eve by telling her lies about God (Genesis 3:1-5). He thus became a “Devil,” which means “Slanderer.” At the same time, he became “Satan,” which means “Opposer.”

Cursed
By using lies and trickery, Satan the Devil caused Adam and Eve to disobey God (Genesis 2:17; 3:6). As a result of disobedience, Adam and Eve were cursed to die. The curse extended to their offspring who grow old and die. God had said they would die if they disobeyed (Genesis 3:17-19). Since Adam became imperfect when he sinned, all his offspring inherited sin from him (Read Romans 5:12). The situation might be illustrated with a pan used for baking bread. If the pan has a dent in it, what happens to each loaf of bread made in the pan? Each loaf has a dent, or an imperfection, in it. Similarly, each human has inherited a “dent” of imperfection from Adam. That is why all humans grow old and die (Romans 3:23).

Challenging God
When Satan led Adam and Eve into sinning against God, he was really leading a rebellion. He was challenging God Jehovah’s way of ruling. In effect, Satan was saying: ‘God is a bad ruler. He tells lies and holds back good things from his subjects. Humans do not need to have God ruling over them. They can decide for themselves what is good and what is bad. And they will be better off under my rulership.’ How would God handle such an insulting challenge? Some think that God should simply have put the rebels to death. But would that have answered Satan’s challenge?

Justice
Jehovah’s perfect sense of justice would not allow him to put the rebels to death right away. He decided that time was needed to answer Satan’s challenge in a satisfying way and to prove that the Devil is a liar. So God determined that he would permit humans to rule themselves for some time under Satan’s influence. The Christian today has the opportunity to support Jehovah’s side in answer to Satan’s challenge through use of God's gift, free will. You can accept Jehovah as your Ruler and help to show that Satan is a liar (Psalm 73:28; read Proverbs 27:11). However, only a few among billions of people in this world are resolute, due to the overwhelming influence of the "ruler of the World".

Source

 * bh, What Is God’s Purpose for the Earth?, The Origin of an enemy, p.31