Abstract Background In South Korea, the prognosis of avoidable hospitalization in diabetes has not been evaluated, even though the incidence rate is considerably high compared to the Organization for Economic Co-operation and Development average. This study investigated the association between diabetic avoidable hospitalization after the diagnosis of type 2 diabetes mellitus and short- and long-term all-cause mortality. Methods Participants were type 2 diabetes mellitus patients aged 60 years and older and gathered through the National Health Insurance Services Senior cohort data from 2008 to 2019. The outcome measures included five-year and overall period all-cause mortality. The main independent variable was the first-year experience of diabetic avoidable hospitalization after type 2 diabetes mellitus diagnosis. Regression analysis was performed using the Cox proportional hazard model. To enhance the robustness of the study results, a sensitivity analysis and inverse probability of treatment weighting method were conducted. Results Among 31 222 participants, 2343 (7.5%) died within 5 years of type 2 diabetes mellitus diagnosis and 5314 (17.0%) died in the overall study period after type 2 diabetes mellitus diagnosis. Participants who experienced diabetic avoidable hospitalization one year after being diagnosed with type 2 diabetes mellitus had a higher risk of all-cause mortality compared to those who did not (Five-year: hazard ratio 1.84, 95% confidence interval 1.54-2.21; Overall period: hazard ratio 1.81, 95% confidence interval 1.60-2.06). Conclusions Enhancing accessibility and quality of primary care to prevent avoidable hospitalization in older patients with type 2 diabetes mellitus is necessary. Key messages • Older patients with T2DM who experienced avoidable hospitalization exhibited higher all-cause mortality rates in both the short and long terms. • Enhancing the accessibility and quality of primary care to prevent avoidable hospitalization in older patients with type 2 diabetes mellitus is necessary.