First of all, we have to be clear when someone says that God created everything. The Bible tells us that God created the heavens and the earth, the spiritual realm, animals, etc., (Gen. 1:1-31; Ezek. 28:13-17). But, God has not created that which does not exist. This is not a trick answer. We have to realize that God knows all things, actual as well as potential.
The question is better asked, "Did God create everything that exists?" Still, when it comes to the devil, it is a good question to ask and the answer is yes and no.
God did not create the devil as a fallen, evil being. God created the angel, Lucifer, who was good but then rebelled against God and fell (Isaiah 14:12-15). This rebellion, and Lucifer's fall away from God, is when Lucifer became the devil. So we cannot say that God created the devil, but we can say that God created the angel Lucifer who later became the devil.
This article is also available in: Português