Background: The positive predictive effect of altruism on physical and psychological well-being has been extensively demonstrated in previous studies, but few studies have examined the effect of altruism on negative mental health outcomes when altruists cannot perform altruistic behaviours. This study explored the influence of altruism on negative affect and mental health (anxiety and depressive symptoms) during the COVID-19 pandemic while people self-isolated at home in China. Method: University students were recruited to participate in a cross-sectional online survey during the outbreak of COVID-19 in China. Self-reported perceived risk, altruism, negative affect, anxiety and depressive symptoms were measured using the Self-Report Altruism Scale (SRA scale), the Positive and Negative Affect Schedule (PANAS), the 7-item Generalized Anxiety Disorder Scale (GAD-7) and the 9-item Patient Health Questionnaire depression scale (PHQ-9). A structural equation model was used to analyse the mediating and moderating effects on mental health. Results: The final sample comprised 1346 Chinese participants (Mage = 19.76 ± 2.23 years, 73% female). Overall, the higher the risk the participants perceived, the more negative affect they exhibited (β = 0.16, p < .001), and thus, the more anxious and depressed they felt (β = 0.134, p < .001); however, this relationship between risk perception and negative affect was moderated by altruism. In contrast to previous studies, the increase in negative affect associated with the increased perceived risk was pronounced among individuals with high altruism (t = 7.68, p < .001). Conclusions: Individuals with high altruism exhibited more negative affect than those with low altruism, which indirectly increased their anxiety and depressive symptoms. These findings enrich theories of altruism and provide valuable insight into the influence of altruism on mental health during the COVID-19 outbreak.