Generous behaviour is known to increase happiness, which could thereby motivate generosity. In this study, we use functional magnetic resonance imaging and a public pledge for future generosity to investigate the brain mechanisms that link generous behaviour with increases in happiness. Participants promised to spend money over the next 4 weeks either on others (experimental group) or on themselves (control group). Here, we report that, compared to controls, participants in the experimental group make more generous choices in an independent decision-making task and show stronger increases in self-reported happiness. Generous decisions engage the temporo-parietal junction (TPJ) in the experimental more than in the control group and differentially modulate the connectivity between TPJ and ventral striatum. Importantly, striatal activity during generous decisions is directly related to changes in happiness. These results demonstrate that top–down control of striatal activity plays a fundamental role in linking commitment-induced generosity with happiness.