Context: Providing year-long rural immersion as part of the medical degree is commonly used to increase the number of doctors with an interest in rural practice. However, the optimal duration and setting of immersion has not been fully established. This paper explores associations between various durations and settings of rural immersion during the medical degree and whether doctors work in rural areas after graduation. Methods: Eligible participants were medical graduates of Monash University between 2008 and 2016 in postgraduate years 1-9, whose characteristics, rural immersion information and work location had been prospectively collected. Separate multiple logistic regression and multinomial logit regression models tested associations between the duration and setting of any rural immersion they did during the medical degree and (i) working in a rural area and (ii) working in large or smaller rural towns, in 2017. Results: The adjusted odds of working in a rural area were significantly increased if students were immersed for one full year (odds ratio [OR], 1.79; 95% confidence interval [CI], 1.15–2.79), for between 1 and 2 years (OR, 2.26; 95% CI, 1.54–3.32) and for 2 or more years (OR, 4.43; 95% CI, 3.03–6.47) relative to no rural immersion. The strongest association was for immersion in a mix of both regional hospitals and rural general practice (OR, 3.26; 95% CI, 2.31–4.61), followed by immersion in regional hospitals only (OR, 1.94; 95% CI, 1.39–2.70) and rural general practice only (OR, 1.91; 95% CI, 1.06–3.45). More than 1 year's immersion in a mix of regional hospitals and rural general practices was associated with working in smaller regional or rural towns (<50 000 population) (relative risk ratios [RRR] 2.97; 95% CI, 1.82–4.83). Conclusion: These findings inform medical schools about effective rural immersion programmes. Longer rural immersion and immersion in both regional hospitals and rural general practices are likely to increase rural work and rural distribution of early career doctors.