Most versions of the game feature a system in which players make two choices for characters. One is the character's views on "law" vs "chaos", the other on "good" vs "evil". The two axes allow for nine alignments in combination.
The original version of D&D allowed players to choose among three alignments when creating a character: lawful, implying honor and respect for society's rules; chaotic, implying rebelliousness and individualism; and neutral, seeking a balance between the extremes.
The 1977 release of the Dungeons & Dragons Basic Set introduced a second axis of good, implying altruism and respect for life, vs evil, implying selfishness and no respect for life. As with the law-vs-chaos axis, a neutral position exists between the extremes. Characters and creatures could be lawful and evil at the same time (such as a tyrant), or chaotic but good (such as Robin Hood).
Advanced Dungeons & Dragons (AD&D), released between 1977 and 1979, continued the two-axis system. The 1981 version of the Basic Set, however, went back to the earlier one-axis alignment system.
AD&D 2nd Edition, released in 1988, retained the two-axis system. In that edition, a character who performs too many actions outside their alignment can find their alignment changed, and is penalized by losing experience points, making it harder to reach the next level. D&D 3rd Edition, released in 2000, kept the same alignment system.
D&D 4th Edition, released in 2008, reduced the number of alignments to five: lawful good, good, evil, chaotic evil, and unaligned. In that edition, "good" replaced neutral good and did not encompass chaotic good; "evil" replaced neutral evil and did not encompass lawful evil; "unaligned" replaced true neutral and did not encompass lawful neutral and chaotic neutral.
D&D 5th Edition, released in 2014, returned to the previous schema of nine alignments, and included a tenth option of "unaligned" for creatures that operate on instinct, not moral decision making.
Richard Bartle's Designing Virtual Worlds noted that alignment is a way to categorize players' characters, along with gender, race, character class, and sometimes nationality. Alignment was designed to help define role-playing, a character's alignment being seen as their outlook on life. A player decides how a character should behave in assigning an alignment, and should then play the character in accordance with that alignment.
A character's alignment can change. If a lawful neutral character consistently performs good acts, when neutral or evil actions were possible, the character's alignment will shift to lawful good. In games, the Dungeon Master (referee) decides when alignment violations occur, as it is subjective and often frowned upon, if not outright disallowed.
Characters acting as a party should have compatible alignments; a party with both good and evil characters may turn against itself. Bill Slavicsek and Richard Baker's Dungeon Master For Dummies noted that a party of good or neutral characters works better as the motivations for adventures are easier, the group dynamics are smoother, and the "heroic aspects of D&D shine through in ways that just don't happen when players play evil characters".
The law versus chaos axis in D&D predates good versus evil in the game rules.
Originally the law/chaos axis was defined as the distinction between "the belief that everything should follow an order, and that obeying rules is the natural way of life", as opposed to "the belief that life is random, and that chance and luck rule the world". According to the early rulebook, lawful characters are driven to protect the interest of the group above the interest of the individual and would strive to be honest and to obey just and fair laws. Chaotic creatures and individuals embraced the individual above the group and viewed laws and honesty as unimportant. At that time, the rulebook specified that "chaotic behavior is usually the same as behavior that could be called 'evil'". Neutral creatures and characters believe in the importance of both groups and individuals, and felt that law and chaos are both important. They believe in maintaining the balance between law and chaos and were often motivated by self-interest.
The third edition D&D rules define "law" and "chaos" as follows:
Law implies honor, trustworthiness, obedience to authority, and reliability. On the downside, lawfulness can include closed-mindedness, reactionary adherence to tradition, judgmentalness, and a lack of adaptability. Those who consciously promote lawfulness say that only lawful behavior creates a society in which people can depend on each other and make the right decisions in full confidence that others will act as they should.
Chaos implies freedom, adaptability, and flexibility. On the downside, chaos can include recklessness, resentment toward legitimate authority, arbitrary actions, and irresponsibility. Those who promote chaotic behavior say that only unfettered personal freedom allows people to express themselves fully and lets society benefit from the potential that its individuals have within them.
Someone who is neutral with respect to law and chaos has a normal respect for authority and feels neither a compulsion to follow rules nor a compulsion to rebel. They are honest but can be tempted into lying or deceiving others if it suits him/her.
The conflict of good versus evil is a common motif in D&D and other fantasy fiction. Although player characters can adventure for personal gain rather than from altruistic motives, it is generally assumed that the player characters will be opposed to evil and will tend to fight evil creatures.
The third edition D&D rules define "good" and "evil" as follows:
Good implies altruism, respect for life, and a concern for the dignity of sentient beings. Good characters make personal sacrifices to help others.
Evil implies harming, oppressing, and killing others. Some evil creatures simply have no compassion for others and kill without qualms if doing so is convenient or if it can be set up. Others actively pursue evil, killing for sport or out of duty to some malevolent deity or master.
People who are neutral with respect to good and evil have compunctions against killing the innocent but lack the commitment to make sacrifices to protect or help others. Neutral people are committed to others by personal relationships.
Within the game, Paladins, altruistic heroes, and creatures such as angels are considered good. Villains and violent criminals are considered evil, as are inherently evil creatures such as demons and most undead. Animals are considered neutral even when they attack innocents, because they act on natural instinct and lack the intelligence to make moral decisions; in the fifth edition, this is expressed by labeling such beasts as "unaligned".
The nine alignments can be shown in a grid, as follows:
|Law vs. chaos|
|Good||Lawful good||Neutral good||Chaotic good|
|Neutral||Lawful neutral||(True) neutral||Chaotic neutral|
|Evil||Lawful evil||Neutral evil||Chaotic evil|
A lawful good character typically acts with compassion and always with honor and a sense of duty, though will often regret taking any action they fear would violate their code; even if they recognize such action as being good. Such characters include righteous knights, paladins, and most dwarves. Lawful good creatures include the noble golden dragons.
A neutral good character typically acts altruistically, without regard for or against lawful precepts such as rules or tradition. A neutral good character has no problems with cooperating with lawful officials, but does not feel beholden to them. In the event that doing the right thing requires the bending or breaking of rules, they do not suffer the same inner conflict that a lawful good character would.
A chaotic good character does what is necessary to bring about change for the better, disdains bureaucratic organizations that get in the way of social improvement, and places a high value on personal freedom, not only for oneself, but for others as well. Chaotic good characters usually intend to do the right thing, but their methods are generally disorganized and often out of sync with the rest of society.
A lawful neutral character typically believes strongly in lawful concepts such as honor, order, rules, and tradition, but often follows a personal code in addition to, or even in preference to, one set down by a benevolent authority. Examples of lawful neutral characters include a soldier who always follows orders, a judge or enforcer who adheres mercilessly to the letter of the law, and a disciplined monk.
A neutral character (also called "true neutral") is neutral on both axes and tends not to feel strongly towards any alignment, or actively seeks their balance. Druids frequently follow this dedication to balance and, under Advanced Dungeons & Dragons rules, were required to be this alignment. In an example given in the 2nd Edition Player's Handbook, a typical druid might fight against a band of marauding gnolls, only to switch sides to save the gnolls' clan from being totally exterminated.
Most animals were originally considered true neutral, because they lack the capacity for moral judgment in general, guided by instinct rather than conscious decision. The 4th edition introduced an additional alignment called "unaligned" for creatures not sapient enough to make decisions based on alignment, even that of neutrality; this alignment is also used in the 5th edition.
A chaotic neutral character is an individualist who follows their own heart and generally shirks rules and traditions. Although chaotic neutral characters promote the ideals of freedom, it is their own freedom that comes first; good and evil come second to their need to be free.
A lawful evil character sees a well-ordered system as being easier to exploit and shows a combination of desirable and undesirable traits. Examples of this alignment include tyrants, devils, corrupt officials, and undiscriminating mercenary types who have a strict code of conduct.
A neutral evil character is typically selfish and has no qualms about turning on allies-of-the-moment, and usually makes allies primarily to further their own goals. A neutral evil character has no compunctions about harming others to get what they want, but neither will they go out of their way to cause carnage or mayhem when they see no direct benefit for themselves. Another valid interpretation of neutral evil holds up evil as an ideal, doing evil for evil's sake and trying to spread its influence. Examples of the first type are an assassin who has little regard for formal laws but does not needlessly kill, a henchman who plots behind their superior's back, or a mercenary who readily switches sides if made a better offer. An example of the second type would be a masked killer who strikes only for the sake of causing fear and distrust in the community.
A chaotic evil character tends to have no respect for rules, other people's lives, or anything but their own desires, which are typically selfish and cruel. They set a high value on personal freedom, but do not have much regard for the lives or freedom of other people. Chaotic evil characters do not work well in groups because they resent being given orders and do not usually behave themselves unless there is no alternative. Examples of this alignment include higher forms of undead, such as liches, and violent killers who strike for pleasure rather than profit.
The D&D alignment system is occasionally referenced as a system of moral classification in other contexts. Salon television critic Heather Havrilesky, while reviewing the HBO television series True Blood, analyzed the program's characters in terms of D&D alignments and identified protagonist Sookie Stackhouse as chaotic good, her vampire boyfriend Bill Compton as lawful neutral, Eric Northman as lawful evil, and Lafayette Reynolds as chaotic neutral. In "Hostiles and Calamities", the 11th episode of season 7 of The Walking Dead television series, the character Eugene Porter makes a reference to the D&D alignment system when describing himself as "...not good. I’m not lawful, neutral, or chaotic." The alignment chart Internet meme humorously categorizes various items in a three-by-three grid.
Since neutral alignments are traditionally labeled "true" versions of the other axis (so "true good" equals "neutral good"), the new system can be shown as above. The change represents a staggering metaphysical and psychological shift. Lawful Neutral, Lawful Evil, Chaotic Good, and Chaotic Neutral have been removed as archetypes for all of the denizens in the Dungeons and Dragons universe...... So you can't fail to be Good if you're Lawful...... So again it's impossible to see how you could be Evil and be Lawful in the new sense...... Being Chaotic is so undermining of our ability to act rationally that a Chaotic person will not possess the ability to be Good...... But then, the people in the middle are those who will neither. So true Neutrals will neither law nor chaos, neither good nor evil.