Patients with Type 2 diabetes mellitus (T2DM) and coronary artery disease (CAD) are at high risk of developing major adverse cardiovascular events (MACE). This is a multicenter, retrospective, and observational study performed in Spain aimed to characterize these patients in a real-world setting. Unstructured data from the Electronic Health Records were extracted by EHRead®, a technology based on Natural Language Processing and machine learning. The association between new MACE and the variables of interest were investigated by univariable and multivariable analyses. From a source population of 2,184,662 patients, we identified 4072 adults diagnosed with T2DM and CAD (62.2% male, mean age 70 ± 11). The main comorbidities observed included arterial hypertension, hyperlipidemia, and obesity, with metformin and statins being the treatments most frequently prescribed. MACE development was associated with multivessel (Hazard Ratio (HR) = 2.49) and single coronary vessel disease (HR = 1.71), transient ischemic attack (HR = 2.01), heart failure (HR = 1.32), insulin treatment (HR = 1.40), and percutaneous coronary intervention (PCI) (HR = 2.27), whilst statins (HR = 0.73) were associated with a lower risk of MACE occurrence. In conclusion, we found six risk factors associated with the development of MACE which were related with cardiovascular diseases and T2DM severity, and treatment with statins was identified as a protective factor for new MACE in this study.