The prognostic impact of non-obstructive coronary artery disease (CAD) remains controversial. Therefore, the objective of this study is to assess the long-term prognostic significance of non-obstructive CAD using machine learning models. We designed a multicenter retrospective, longitudinal, and observational study that included 3265 patients classified into three groups: 1426 patients with lesions < 20%, 643 patients with non-obstructive CAD (lesions 20–50%), and 1196 patients with obstructive CAD (lesions > 70%). A composite cardiovascular event (acute myocardial infarction, stroke, hospitalization due to heart failure, or cardiovascular-related death) was assessed after a mean follow-up of 43 months. To achieve this, various machine learning models were constructed. The model with the highest accuracy was selected to perform a Shapley Additive Explanations (SHAP) analysis, revealing the contribution of different variables in predicting an event. The SHAP analysis suggested that the percentage of coronary lesion was the most significant predictor of cardiovascular events. None of the models demonstrated adequate capability in predicting the event, showing only a good predictive ability for the absence of an endpoint. In conclusions, this study demonstrates how machine learning techniques may facilitate the development of high-performing models for predicting long-term cardiovascular events in patients undergoing coronary angiography.