Acute ST-segment elevation myocardial infarction (STEMI) is a severe cardiovascular disease that poses a significant threat to the life and health of patients. This study aimed to investigate the predictive value of triglyceride glucose index (TyG) combined with neutrophil-to-lymphocyte ratio (NLR) for in-hospital cardiac adverse event (MACE) after PCI in STEMI patients. From October 2019 to June 2023, 398 STEMI patients underwent emergency PCI in the Second People's Hospital of Hefei. Stepwise regression backward method and multivariate logistic regression analysis were used to screen the independent risk factors of MACE in STEMI patients. To construct the prediction model of in-hospital MACE after PCI in STEMI patients: Grace score model is the old model (model A); TyG combined with NLR model (model B); Grace score combined with TyG and NLR model is the new model (model C). We assessed the clinical usefulness of the predictive model by comparing Integrated Discrimination Improvement (IDI), Net Reclassification Index (NRI), Receiver Operating Characteristic Curve (ROC), and Decision Curve Analysis (DCA). Stepwise regression and multivariate logistic regression analysis showed that TyG and NLR were independent risk factors for in-hospital MACE after PCI in STEMI patients. The constructed Model C was compared to Model A. Results showed NRI 0.5973; NRI + 0.3036, NRI − 0.2937, IDI 0.3583. These results show that the newly developed model C predicts the results better than model A, indicating that the model is more accurate. The ROC analysis results showed that the AUC of Model A for predicting MACE in STEMI was 0.749. Model B predicted MACE in STEMI with an AUC of 0.685. Model C predicted MACE in STEMI with an AUC of 0.839. For DCA, Model C has a better net return between threshold probability 0.1 and 0.78, which is better than Model A and Model B. In this study, by combining TyG, NLR, and Grace score, it was shown that TyG combined with NLR could reasonably predict the occurrence of MACE after PCI in STEMI patients and the clinical utility of the prediction model.