Philosophers struggle to explain the origin of evil. One thing is certain: God is not its author, creator, or efficient cause. Everything He created was good. Evil was no part of His creation.
Who then created evil? No one. Evil is neither substance, being, spirit, nor matter. It is not a created thing. It is simply a want of moral perfection in moral agents who were originally created sinless. Evil has no existence apart from fallen creatures.
How could creatures made sinless fall into sin? John Calvin dealt with that very question:
The Lord had declared that "everything that he had made ... was exceedingly good" [Gen. 1:31]. Whence, then comes this wickedness to man, that he should fall away from his God? Lest we should think it comes from creation, God had put His stamp of approval on what had come forth from himself. By his own evil intention, then, man corrupted the pure nature he had received from the Lord; and by his fall drew all his posterity with him into destruction. Accordingly, we should. contemplate the evident cause of condemnation in the corrupt nature of humanity which is closer to us-rather than seek a hidden and utterly incomprehensible cause in God's predestination.
God, although absolutely sovereign over all things, is not the author or instigator of sin. He did not concoct sin, encourage it, sanction it, condone it, approve it, or otherwise countenance it. But He created moral agents with a capacity to make moral choices, and they fell (in Calvin's words) by their own evil intention.
Although sin is no part of creation, neither is it something that sneaked in and caught God by surprise. Sin was not something that thwarted the plan of God; rather, it was part of God's plan from the beginning. He had a good purpose in allowing it, but still He was neither the instigator nor the author of His creatures' evil deeds. Rather, He made them moral agents and gave them freedom to act, and they fell into sin by their own choice.
In other words, God is sovereign over all , and evil was in no sense a breach of His absolute sovereignty. But He did not take the same active role in the devising of evil that He did in the creation of good. Fallen creatures themselves bear full responsibility for their sin. God's creation at its completion was impeccably flawless. Evil spoiled its perfect goodness after God had finished creating.
God's sovereign purpose from the beginning was to overrule His creatures' evil deeds and destroy evil forever, restoring His creation to a glory that surpasses even the glory and perfection of Eden.
(Pages 189-190, emphasis added)