To establish a scoring system combining the ACEF score and the quantitative blood flow ratio (QFR) to improve the long-term risk prediction of patients undergoing percutaneous coronary intervention (PCI). In this population-based cohort study, a total of 46 features, including patient clinical and coronary lesion characteristics, were assessed for analysis through machine learning models. The ACEF-QFR scoring system was developed using 1263 consecutive cases of CAD patients after PCI in PANDA III trial database. The newly developed score was then validated on the other remaining 542 patients in the cohort. In both the Random Forest Model and the DeepSurv Model, age, renal function (creatinine), cardiac function (LVEF) and post-PCI coronary physiological index (QFR) were identified and confirmed to be significant predictive factors for 2-year adverse cardiac events. The ACEF-QFR score was constructed based on the developmental dataset and computed as age (years)/EF (%) + 1 (if creatinine ≥ 2.0 mg/dL) + 1 (if post-PCI QFR ≤ 0.92). The performance of the ACEF-QFR scoring system was preliminarily evaluated in the developmental dataset, and then further explored in the validation dataset. The ACEF-QFR score showed superior discrimination (C-statistic = 0.651; 95% CI: 0.611-0.691, P < 0.05 versus post-PCI physiological index and other commonly used risk scores) and excellent calibration (Hosmer-Lemeshow χ2 = 7.070; P = 0.529) for predicting 2-year patient-oriented composite endpoint (POCE). The good prognostic value of the ACEF-QFR score was further validated by multivariable Cox regression and Kaplan-Meier analysis (adjusted HR = 1.89; 95% CI: 1.18-3.04; log-rank P < 0.01) after stratified the patients into high-risk group and low-risk group. An improved scoring system combining clinical and coronary lesion-based functional variables (ACEF-QFR) was developed, and its ability for prognostic prediction in patients with PCI was further validated to be significantly better than the post-PCI physiological index and other commonly used risk scores.