Research and theory indicate that self-efficacy can be influenced by factors related to persuasion, experiences of success, and emotional states. These factors can include situations that challenge people's beliefs about their abilities. Social exclusion is associated with deprivation of the need for control, low self-control, and low self-esteem. This study examined whether social exclusion might affect general self-efficacy beliefs. It was predicted that self-efficacy would be lower in the exclusion condition than in the inclusion condition and that satisfaction of the need for control and belonging would mediate the exclusion effect on self-efficacy. Feelings of control and belonging were manipulated using a Cyberball game in which participants were excluded or included in the online ball-tossing game. The results confirmed the hypotheses. Self-efficacy, belonging, and control were lower in ostracism than in the inclusion condition. Control and belonging were positively related to self-efficacy and mediated the effect of ostracism on self-efficacy. Research suggests that creating an environment that satisfies control and relatedness needs may foster self-efficacy and that each need is important.