Background To strengthen the construction of health talents team in rural areas, a national compulsory services program (CSP) was started in 2010 in China. In 2015, the state required graduates of the CSP to participate in a 3-year standardized training for residents (residency) upon graduation. Objective To understand the participation of CSP graduates in residency, analyze the effect of residency on the pass rate of the practicing physician's examination for CSP graduates, and explore the significance of residency on the training of CSP graduates and the rural primary health workforce, so as to provide policy recommendations for the high-quality training of CSP graduates. Methods Starting in 2015, a cohort of CSP graduates was established from a total of 4 colleges undertaking CSP training programs in 3 provinces in the Midwest of China, and 1∶1 general clinical graduates who graduated the same year were selected as controls and followed up annually. Descriptive analysis was used to show the status of CSP graduates' participation in residency, the pass rate of the examination for practicing physicians, and to compare them with those of general clinical graduates. Stratified Cox regression was used to analyze the effect of attending residency on the pass rate of practicing physician exams. Results 86.69% (228/263), 86.78% (361/416), 87.79% (381/434), 91.08% (388/426), 94.43% (356/377) of the 2015—2019 CSP graduates stated that they were willing to participate in training after graduation, and 72.20% (200/277), 58.75% (151/257), 70.42% (169/240), 73.23% (145/198), 61.03% (83/136) of the same general clinical graduates stated that they were willing to participate in training after graduation. The actual participation proportions of CSP graduates in 2015—2019 in residency were 99.02% (202/204), 97.10% (301/310), 94.99% (322/339), 89.91% (285/317), 69.45% (241/347), 67.57% (100/148), 66.12% (80/121), 74.79% (89/119), 43.33% (39/90), 34.62% (27/78), respectively. The pass rate of practicing physician examination in 2015—2017 CSP graduates reached 99.23% (259/261), 94.86% (351/370), 91.74% (311/339), while the pass rate of same general clinical students was 97.74% (173/177), 95.87% (116/121), 88.24% (105/119), respectively. Cox regression results showed that after adjusting for demographic variables, family economic status, intention of studying medicine, medical education, and factors related to attending the residency, the probability of attending the residency group passing the practitioner's examination was 1.232 times higher than that of not attending the residency group 〔95%CI (1.02, 1.49), P=0.03〕. Conclusion CSP graduates' willingness to participate in residency training, the proportion of participation, and the pass rate of the qualifying examination for practicing physicians were all high. Participating in residency training can improve the ability of medical graduates and has a promoting effect on passing the qualifying examination of practicing physicians.