Altruism is an effective method of coping with the threat. The results of six studies provide reliable evidence that individuals with higher childhood socioeconomic status are more likely to act altruistic behavior under a safety threat. However in situations without a safety threat, individuals’ childhood socioeconomic status has no significant impact on altruism. In Studies 1 and 2, we first test the moderation effect of a safety threat on childhood SES and altruism. In Study 1(N = 105), we activated the participants’ safety threat using imaginary scenarios and the altruism was measured with an attitudinal measure. In Study 2(N = 68), we created a more convincing safety threat situation in the laboratory and examined the participants’ actual donations. Furthermore, we identify an important psychological mechanism under the effect: sense of control. That is, individuals with richer childhoods adopt altruistic strategies to cope with threats because they have higher sense of control. Therefore, the mediation effect of sense of control is assessed (Study 3) and manipulated (Study 4). The altruistic behavior could be sharing material goods (Study 3a, N = 94) and time spent volunteering (Study 3b, N = 240). In Study 4(N = 261), because sense of control is the psychological mechanism of the effect, individuals’ altruism with low childhood SES would increase after the manipulation with a temporary boost. In Study 5, our hypothesis is again tested in more realistic environmental conditions with big data (N = 10724). When living in an area with more serious pollution, people with high-SES childhoods planted trees more often than those with low-SES childhoods. However, when people lived in areas with less serious pollution, childhood SES did not predict their tree planting behavior last year. In summary, our findings were promoted by the publicly available data and verified in a realistic context.