Social bonds fulfill the basic human need to belong. Being rejected thwarts this basic need, putting bonds with others at risk. Attachment theory suggests that people satisfy their need to belong through different means. Whereas anxious attachment is associated with craving acceptance and showing vigilance to cues that signal possible rejection, avoidant attachment is associated with discomfort with closeness and using avoidant strategies to regulate one's relationships. Given these different styles by which people satisfy their need to belong (that can operate simultaneously within the same individual), responses to social rejection may differ according to these individual differences in attachment anxiety and avoidance. To test this hypothesis, we used neuroimaging techniques to examine how the degree to which people display each of the two attachment dimensions (anxiety and avoidance) uniquely correlated with their neural activity during a simulated experience of social exclusion. Anxious attachment related to heightened activity in the dorsal anterior cingulate cortex (dACC) and anterior insula, regions previously associated with rejection-related distress. In contrast, avoidant attachment related to less activity in these regions. Findings are discussed in terms of the strategies that individuals with varying attachment styles might use to promote maintenance of social bonds.