Adolescence is a period of development in which peer relationships become especially important. A computer-based game (Cyberball) has been used to explore the effects of social exclusion in adolescents and adults. The current functional magnetic resonance imaging (fMRI) study used Cyberball to extend prior work to the cross-sectional study of younger children and adolescents (7 to 17 years), identifying age-related changes in the neural correlates of social exclusion across the important transition from middle childhood into adolescence. Additionally, a control task illustrated the specificity of these age-related changes for social exclusion as distinct from expectancy violation more generally. During exclusion, activation in and functional connectivity between ventrolateral prefrontal cortex and ventral anterior cingulate cortex increased with age. These effects were specific to social exclusion and did not exist for expectancy violation. Our results illustrate developmental changes from middle childhood through adolescence in both affective and regulatory brain regions during social exclusion.