Summary Introduction: Becoming a medical doctor is a very complex process. Factors related to the student’s personality, the educational process and the daily experience with death contribute to peculiar psycho-emotional experiences, not always properly investigated during medical training. Objective: To estimate the prevalence of common mental disorders (CMD) and associated factors, over six years of medical undergraduate course among all students of a class at a public university in Brazil. Method: Cross-sectional study based on repeated surveys. All 40 students enrolled in 2006 in the first year of our medical school were included and evaluated annually until 2011 using the SRQ-20 and a structured questionnaire prepared by the authors on sociodemographic, personal and educational aspects. We performed logistic regression and correspondence analysis. Results: The 40 freshmen in the first evaluation had a mean age of 20 years (SD=2.4), 57.5% were female, and 41% were approved after taking their third entrance exam. The prevalence of CMD increased over the years: from 12.5% in the first year to 43.2% in the fifth. The following variables were potentially associated with CMD: female sex (PR=1.38), originating from capital cities (PR=1.97), the program was less than they expected (PR=3.20), discomfort with program activities (PR=2.10), dissatisfaction with teaching strategies (PR=1.38), and feeling that the program is not a source of pleasure (PR=2.06), being R2=28.8% and AIC=60.04. Conclusion: The factors potentially associated with the high prevalence of CMD were those related to medical training, showing that it is necessary to implement preventive measures and review the educational process in order to reduce the damages caused by the development of CMD.