Oppositional loyalty commands substantial interest among scholars and enterprise executives as a new form of brand loyalty in online communities. However, understanding the driving factors and dimensional structure thereof, including the willingness to pay a price premium, oppositional referrals, schadenfreude, and anti-brand actions, remains limited. We collected 1226 samples from Xiaomi's mobile online community. The results indicate that brand attachment has positive effects on oppositional loyalty. In addition, moral identity positively moderates the relationship between brand attachment and oppositional referrals. On the contrary, moral identity negatively moderates the impact of brand engagement on schadenfreude and anti-brand actions. Negative effects on competing brands are harmful to favored brands through the moderating effects of moral identity. This research helps corporate managers understand oppositional loyalty behaviors correctly and makes new contributions to the fields of brand loyalty, Consumer behavior, and online community.INDEX TERMS Online community members, brand attachment, moral identity, oppositional loyalty.