Extant literature suggested that committing immoral actions in video games may elicit feelings of guilt and encourage prosocial outcomes. However, there is a dearth of research that examined how decision-making involving various moral foundations in video games can influence players' intergroup perceptions. Therefore, this study examined how players' in-game decisions with respect to the six moral foundations and interactions with different non-player characters' (NPCs') identities influenced their attitudes toward outgroup foreign immigrants. A 2 (video game scenarios: moral choices vs. non-moral choices) by 3 (NPCs' nationality: all citizens vs. citizens and foreigners vs. all foreigners) experiment was conducted (N = 300). There was no main interaction effect across conditions. Participants who interacted with only citizen NPCs reported significantly more positive post-game attitudes toward immigrants than those who interacted with both citizen and foreigner characters. Participants who violated the care/harm, ingroup/loyalty, and liberty/oppression foundations experienced higher levels of guilt, but this had no impact on their immigrant attitudes. However, those who violated the fairness/reciprocity and liberty/oppression foundations reported poorer intergroup attitudes. Implications of the findings are discussed.