Most psychological theories and research on shame focus on the ugly aspects and negative consequences of this emotion. Theories on moral emotions, however, assume that shame acts as a commitment device motivating prosocial behavior. To solve this apparent paradox, the authors studied the effects of shame on prosocial behavior. Shame was hypothesized to motivate prosocial behavior when it was relevant for the decision at hand (endogenous). In contrast, shame that was not relevant for the decision at hand (exogenous) was hypothesized to have no such effects. Four experiments with three different shame inductions and two different measures of prosocial behavior confirmed that endogenous shame motivated prosocial behavior for proselfs but that exogenous shame did not. Shame is shown to have a clear interpersonal function in the sense that it acts as a commitment device.