IntroductionThe needs-based shortage of healthcare workers is severe worldwide and it would be exacerbated if many medical students switch to other careers after graduation. Maintaining and improving the career commitment of medical students, which could be a feasible, effective, and scalable way to reduce the attrition rate, is essential in medical education. We designed a randomized experiment to test whether an information intervention based on role modeling could enhance medical students’ career commitment.MethodsIn the randomized experiment, the sample (N= 36,482) was divided into the treatment group (N= 18,070) and the control group (N= 18,412). The intervention information consisted of image-text messages on Zhong Nanshan, who is an inspiring role model for he went to the frontline of COVID-19 in the most critical circumstances and received praise and affirmation from the public. Α difference-in-differences model was employed to identify the effect of the information intervention. Heterogeneous treatment effects were identified using sub-sample analyses.ResultsThe results showed that the information intervention statistically significantly reduced medical students’ dropout intention by 2.7 percentage points (95% CI: −0.037 to −0.016,t= −4.95,p< 0.001), equivalent to 14.6% of the control group mean. This estimate indicates that the information intervention could significantly increase the career commitment of medical students. Finally, male and senior students were influenced more than their female and junior counterparts, which can be explained by their relatively high dropout intention.ConclusionRole model-based information intervention improves the career commitment of medical students. The underlying behavioral model is that, when students use a role model as their reference point, they consider dropout as a substantial welfare loss. Role modeling is an effective way to improve the career commitment of medical students, especially for males and senior students.