Social exclusion inherently involves an element of expectancy violation, in that we expect other people to follow the unwritten rule to include us in social interactions. In this functional magnetic resonance imaging (fMRI) study, we employed a unique modification of an interactive virtual ball-tossing game called "Cyberball" (Williams et al., 2000) and a novel paradigm called "Cybershape," in which rules are broken in the absence of social exclusion, to dissociate brain regions that process social exclusion from rule violations more generally. Our Cyberball game employed an alternating block design and removed evoked responses to events when the participant was throwing the ball in inclusion to make this condition comparable to exclusion, where participants did not throw. With these modifications, we replicated prior findings of ventral anterior cingulate cortex (vACC), insula, and posterior cingulate cortex activity evoked by social exclusion relative to inclusion. We also identified exclusion-evoked activity in the hippocampi, left ventrolateral prefrontal cortex, and left middle temporal gyrus. Comparing social exclusion and rule violation revealed a functional dissociation in the active neural systems as well as differential functional connectivity with vACC. Some overlap was observed in regions differentially modulated by social exclusion and rule violation, including the vACC and lateral parietal cortex. These overlapping brain regions showed different activation during social exclusion compared to rule violation, each relative to fair play. Comparing activation patterns to social exclusion and rule violation allowed for the dissociation of brain regions involved in the experience of exclusion versus expectancy violation. © 2010 Elsevier Inc.