D&D was an evolution from the old Chainmail wargaming series, which established the basic dice-roll combat system somewhat like the board game "Risk" but much more complex. In the 3rd edition of Chainmail by Gygax & Perrin, they added the "Fantasy Supplement" with a strong nod to Tolkein & Robert E. Howard (Conan series). This included wizards, elves, dwarves, demons, werebears, and the like. The basic magic spell list was created at this time as well.

Regarding alignment, they state, "It is impossible to draw a distinct line between 'good' and 'evil' fantastic figures. Three categories are listed below as a general guide for the wargamer designing orders of battle involving fantastic creatures: LAW NEUTRAL CHAOS."

Impossible ?!