There have been many arguments on here concerning the origin of sin, and many come from the standpoint that God created sin. I would like to refute that.
First, we must realize the attributes of God. He is loving, merciful, just, righteous, jealous, and moral. All of these attributes, the few I have listed, He is perfect in. God is perfect, and so when the Bible clearly states that God is one of these things, it means He is perfect in them.
So, let me point out one of these attributes, justice. What is justice? According to dictionary.com, justice is: the administering of deserved punishment or reward. This definition denotes punishment. What is punishment? Once again, dictionary.com describes punishment as: a penalty inflicted for an offense, fault, etc.
So, we know God is just. We know justice is a punishment for an offense or wrongdoing. Now, you may see where this is going. God's attribute denotes a wrong side of things. By being just, who He is denotes evil(or a wrong side of things).
So, we know God's character denotes evil. Does this mean he is evil? No, this doesn't. It merely makes His character assume something. You can't have cold without hot. Hotness assumes a coldness.
God did not create evil. Did he create sin? Once again, no. We know God created Lucifer and(debatable) God gave angels free will. Now we know Lucifer cannot create anything. He can only destroy or deceive(manipulation). Lucifer manipulated the assumption of evil into a physical thing: sin.
Therefore, God did not create evil. His character assumed evil, which became sin through Lucifer's manipulation.