This study aims to explore the relationship between locus of control, grit, self-esteem and mental health among college students. A questionnaire survey was used to conduct a study on the mental health of 923 E-learning college students from 10 universities in Guangxi, China. In this study, Pearson correlation analysis was used to test the correlation between the study variables, and Bootstrap was used to test the mediating effect and effect ratio of grit and self-esteem. The results show that, locus of control, grit, and self-esteem can predict the mental health of college students. Grit plays a mediating role between locus of control and mental health; self-esteem plays a mediating role between locus of control and mental health; grit and self-esteem have a chain mediating effect between locus of control and mental health. Specifically, internal locus of control can effectively prevent college students from mental health problems through the chain mediation effect of grit and self-esteem. Powerful others and opportunity as the external locus of control will not only reduce the grit and self-esteem of college students, but also lead to more psychological problems. These research results provide suggestions to the university management on how to manage the mental health of E-learning students, especially those with psychological problems.