Children's ability to recognize, evaluate, and respond to discrimination is a critical component of their social and moral development that undergoes significant development throughout early and middle childhood. The present study identified and tested a novel developmental mechanism underlying this development: theory of prejudiced mind (ToPM)-defined as the ability to recognize when people have mental states about social groups (e.g., biased attitudes, stereotypes, and prejudicial feelings) that differ from one's own. Children (N = 155; 3-8 years old; 81 girls, 74 boys; 13.5% Asian, 17.4% Black, 14.2% Hispanic/Latine, 44.5% White, 7.1% multiracial, and 3.3% did not specify) completed a series of modified theory of mind tasks that were specifically designed to assess children's understanding that other people can hold biases (ToPM Diverse Social Preferences), false beliefs (ToPM False Beliefs About Social Groups), and prejudicial feelings (ToPM Hidden Prejudices) about groups, using a novel groups paradigm. We then examined how children's performance on these tasks predicted their evaluation and responses to discrimination in a separate task using a different set of novel groups. We found that, when separately controlling for age and traditional theory of mind performance, children with more advanced ToPM capacities were more likely to recognize discrimination, attribute the discrimination to the discriminator (instead of the marginalized group), and judge the discrimination as unfair. Thus, these findings suggest that children's ability to identify others' mental states about social groups (ToPM) plays a crucial role in helping them recognize, evaluate, and respond to the discrimination they witness in their daily lives. (PsycInfo Database Record (c) 2026 APA, all rights reserved).