In order to explore, from the perspective of the social ecological model, the relationship and its mechanism linking public risk familiarity and mental health during the new coronary pneumonia epidemic, the new coronary pneumonia epidemic risk perception scale, psychological resilience scale, Chinese mental health scale, and SARS familiarity scale were used 741 members of the public were surveyed as research objects. The results show that: (1) When gender, age, and educational background are controlled, risk familiarity has a significant positive predictive effect on public mental health; (2) Risk familiarity predicts mental health through the mediating effect of mental toughness; (3) The mediating effect of mental toughness is moderated by the public’s familiarity with SARS. Specifically, for members of the public with low SARS familiarity, the indirect effect of risk familiarity on mental health through mental toughness is smaller than that for those with high SARS familiarity. The results of this study integrate psychological resilience into the theory of risk cognition, which has implications for the improvement of public mental health.