This study utilized cohort data, student lifestyle surveys, and mental health examination results from a medical school to investigate the impact of factors such as hometown, alcohol use, smoking, university life adaptation, and aptitude on academic failure, with mental health serving as a mediator. We analyzed data from 409 of the 549 incoming students at Keimyung University School of Medicine, excluding 140 individuals with missing data, from the academic years 2015 to 2021. Significant differences were found according to hometown in feelings of depression, suicidal tendencies, and internet addiction. There were also significant differences based on university life adaptation in feelings of depression, suicidal tendencies, and internet addiction, as well as significant differences according to academic aptitude in feelings of depression and internet addiction. Academic failure showed significant differences based on hometown, university life adaptation, and academic aptitude. Furthermore, students’ hometown had a complete mediating effect on academic failure together with feelings of depression, suicidal tendencies, and internet addiction. University life adaptation exhibited a complete mediating effect with suicidal tendencies and a partial mediating effect with feelings of depression and internet addiction. Academic aptitude demonstrated partial mediating effects on feelings of depression, suicidal tendencies, and internet addiction. Based on these results, we suggest establishing counseling programs tailored to the characteristics of medical students, and various programs for university life adaptation are necessary. There is also a need for diverse programs not only for clinical training, but also for different career paths.