What exactly does it mean to be “self-righteous”? 

1. “Self-righteous” is definitely not the same as “hypocritical.”  A hypocrite talks the talk but doesn’t walk the walk.  A self-righteous person can definitely do both; in fact, you’re probably more likely to be called “self-righteous” if you’re strictly observant of your own principles.

2. “Self-righteous” also seems distinct from simply being morally mistaken, or even extremely morally mistaken.  Indeed, we occasionally accuse people on “our own side” of self-righteousness.

3. You are likely to be accused of self-righteousness if you loudly brag about your moral virtue – even if (especially?) your claims are literally true.  But is that all that’s going on?

4. When I call people “self-righteous,” the subtext is normally that they’re loudly observant but morally unreflective.  (As Nietzsche said in Human, All Too Human, “The most dangerous party member.— In every
party there is one who through his all too credulous avowal of the
party’s principles incites the others to apostasy.”)  But perhaps that’s just my pet peeve.

Further thoughts?