How was the Devil created? To answer this question first you must examine the definition for the devil. The devil in my religions is interpreted very differently. Some consider the devil to be an angel who rebelled against god and others believe the devil to be a metaphor for humanities' evil endowments.
Devils creation if he was an angel - In Islamic religion According to the Qur'an God created the Satan out of "smokeless fire" and created man out of clay. He was condemned to hell after disobeying god by choosing not to pay homage to Adam. Because he believed to be better than man. He claimed to be superior to Adam, on the grounds that man was created of earth unlike himself. This caused him to be expelled by God, a fact that Satan blamed on humanity. Hence the mainstream creation of the devil as an entity.
Devil as metaphor- In Baha'i' faith the devil is a metaphor for the "insistent self" or "lower self" which is a self-serving inclination. "This lower nature in man is symbolized as Satan - the evil ego within us, not an evil personality outside." In Esoteric Christianity Satan remains as a being of evil, or at least a metaphor for sin and materialism. With this said the devil was and is a creation spawned by human's sin, temptation and to any human action opposing god.