We propose morality shifting as a mechanism through which individuals can maintain a moral image of the ingroup. We argue that a shift from the moral principles of harm and fairness to those of loyalty and authority occurs when assessing a potentially threatening event, particularly among high ingroup glorifiers. Three studies confirmed this hypothesis using three different methodologies. Study 1 compared the use of language related to four moral foundations formulated in moral psychology in response to ingroup- and outgroup-committed wrongdoings. Results showed that loyalty- and authority-related words were used more, whereas harm- and fairness-related words were used less in response to ingroup- compared with outgroup-committed wrongdoings. Study 2 replicated this effect with regards to the cognitive accessibility of these moral principles. Study 3 confirmed that morality shifting is a motivated response to social identity threat, rather than a response to mere activation of social identity. Finally, as predicted, Study 3 demonstrated the effect of morality shifting to be moderated by ingroup glorification but not ingroup attachment. Implications and consequences for intergroup and individual wrongdoings, as well as for intergroup relations, are discussed. Copyright © 2011 John Wiley & Sons, Ltd.