This study advances identity theory, a prominent sociological social psychological theory, by investigating how the moral identity, moral behavior, and emotions operate in different social contexts, specifically when the moral identity is activated (or not activated) and when individuals are alone or in different types of groups. This extends identity theory by including key processes in social identity theory (identity activation and group membership) which have not been examined in the existing literature concerning the control systems approach to identity. A survey and experiment are administered to examine how the moral identity process operates for individuals in different social contexts. The survey measures individuals' moral identities. In the experiment, subjects are placed in a situation where they have an opportunity to behave immorally to gain an advantage over others. Results show that both the moral identity and group membership predict moral behavior in a situation. Direct activation of the moral identity is not required for it to influence moral behavior, which supports the moral identity as a principle-level identity. Implications of the study findings and recommendations for future research are discussed.