Humans are motivated to connect with others and are sensitive to social exclusion—intentionally leaving out others. This ability to detect social exclusion is suggested to be evolutionarily adaptive, biologically hardwired, and an important feature of social-cognitive development. Yet it is unclear when children start to independently detect social exclusion. Previous developmental research on social exclusion has focused on children older than 4 years of age, but recent infancy research has suggested younger children may be able to process complex social interactions such as social exclusion. The present study is the first to examine whether 2- to 3-year-old children detect social exclusion and if they prefer to affiliate with individuals who have been excluded over individuals who exclude others. Across 2 experiments, 2- and 3-year-old children (N = 140) viewed exclusive group interactions, in which 2 agents unjustly excluded 1 agent, and children were asked to choose whether they preferred to play with an excluded agent or an exclusive agent. Three-year-old children consistently preferred to play with the excluded agent, whereas 2-year-old children showed no preference. Three-year-old children did not show a preference among agents engaged in inclusive interactions and did not prefer an agent who refused to engage with a group, showing that 3-year-old children distinguish unjust exclusion from other types of interactions. Together, these findings suggest 3-year-old children detect social exclusion and are motivated to affiliate with unjustly excluded agents over those who exclude others, whereas these capacities are still developing in 2-year-old children.