In type 2 diabetes mellitus (T2D), the handling of magnesium is disturbed. Magnesium deficiency may be associated with a higher risk of coronary heart disease (CHD). We investigated the associations between (1) dietary magnesium intake; (2) 24 h urinary magnesium excretion; and (3) plasma magnesium concentration with prevalent CHD in T2D patients. This cross-sectional analysis was performed on baseline data from the DIAbetes and LifEstyle Cohort Twente-1 (DIALECT-1, n = 450, age 63 ± 9 years, 57% men, and diabetes duration of 11 (7–18) years). Prevalence ratios (95% CI) of CHD by sex-specific quartiles of magnesium indicators, as well as by magnesium intake per dietary source, were determined using multivariable Cox proportional hazard models. CHD was present in 100 (22%) subjects. Adjusted CHD prevalence ratios for the highest compared to the lowest quartiles were 0.40 (0.20, 0.79) for magnesium intake, 0.63 (0.32, 1.26) for 24 h urinary magnesium excretion, and 0.62 (0.32, 1.20) for plasma magnesium concentration. For every 10 mg increase of magnesium intake from vegetables, the prevalence of CHD was, statistically non-significantly, lower (0.75 (0.52, 1.08)). In this T2D cohort, higher magnesium intake, higher 24 h urinary magnesium excretion, and higher plasma magnesium concentration are associated with a lower prevalence of CHD.