Patient with diabetes (DM) and chronic kidney disease (CKD) are at a higher risk of developing acute coronary syndrome (ACS). However, only a few studies have investigated the separate and joint effects of DM and CKD on the risk of ACS, especially population-based studies under age-, sex- and various cardiovascular risk factor-stratifications. By using a national diabetes cohort derived from the Taiwan National Health Insurance Research Database, we identified a total of 416,143 DM and 541,724 non-DM patients, including 51,208 DM/CKD and 8,894 non-DM/CKD patients, in 2000 who did not have a history of ACS (ICD-9: 410.X, 413.9, 411.1) before 2000. We then prospectively investigated the incidence of ACS by linking to inpatient claims data from 2000 to 2007. A Cox proportional hazard model was used to estimate the relative risk of ACS in individuals with DM and/or CKD under various stratifications. Age- and sex-specific incidence rates were similar between the non-DM/CKD and DM/non-CKD groups, except for female patients under 45 years, in whom DM was associated with a higher risk of ACS than CKD (8.21 vs. 3.82 per 1000 person-years). In the group aged <45 years, the DM/non-CKD patients were associated with a higher relative hazard of ACS than those in the non-DM/CKD group when compared with the non-DM/non-CKD group (men: adjusted hazard ratios [AHR]:1.77; 95% confidence interval [CI]:1.61-1.93 vs. 1.42 [95% CI: 0.73-2.73]; women 1.97 [95% CI: 1.76-2.20] vs. 1.13 [95% CI: 0.36-3.52]). This discrepancy in AHR was reduced with increasing age. The co-existence of DM and CKD further enhanced the AHR in a multiplicative independent manner. A significant age-modification effect was noted in the DM individuals regardless of their CKD status, but not in the non-DM/CKD group. In stratification by various cardiovascular risk factors, diabetes had a higher risk of ACS than CKD in patients with ≤2 selected risk factors, with the exception of the hyperlipidemia and hypertension subgroup. When all three selected risk factors were included, CKD was associated with a higher risk of ACS than DM (AHR: 1.43 [1.27-1.60] vs. 1.25 [1.22-1.29]). In conclusion, DM and CKD were associated with different levels of risk for ACS according to age, sex and certain cardiovascular risk factors. Strategies aimed at preventing ACS should therefore be individualized according to the presence of DM, CKD and various cardiovascular risk factors.