Introduction: The presence of multiple comorbidities increases the risk of all-cause mortality, but the effects of the comorbidity sequence before the baseline date on mortality remained unexplored. This study investigated the relationship between coronary heart disease (CHD), atrial fibrillation (AF) and heart failure (HF) sequence on all-cause mortality risk in type 2 diabetes mellitus. Methods: This study included patients with type 2 diabetes mellitus prescribed antidiabetic/cardiovascular medications in public hospitals of Hong Kong between January 1st, 2009 and December 31st, 2009 with follow-up until death or December 31st, 2019. Cox regression was used to identify comorbidity sequences predicting all-cause mortality in patients with different medication subgroups. Results: A total of 249291 patients (age: 66.0±12.4 years, 47.4% male) were included. At baseline, 7564, 10900 and 25589 patients had AF, HF and CHD, respectively. Over follow-up (3524±1218 days), 85870 patients died (mortality rate: 35.7 per 1000 person-years). Sulphonylurea users with CHD developed later, but insulin users with CHD developing earlier, in the disease course had lower mortality risks. Amongst insulin users with two of the three comorbidities, CHD with preceding AF (hazard ratio [HR]: 3.06, 95% CI: [2.60-3.61], p<0.001) or HF (HR: 3.84 [3.47- 4.24], p<0.001) had a higher mortality. In users of lipid-lowering agents with all three comorbidities, those with preceding AF had higher risk of mortality (AF-CHD-HF: HR: 3.22, [2.24-4.61], p<0.001; AF-HF-CHD: HR: 3.71, [2.66-5.16], p<0.001). Conclusion: The sequence of comorbidity development affects the risk of all-cause mortality to varying degrees in diabetic patients on different antidiabetic/cardiovascular medications.