BACKGROUND: To evaluate the predictive utility of machine learning and nomogram in predicting in-hospital mortality in patients with acute myocardial infarction complicated by cardiogenic shock (AMI-CS), and to visualize the model results in order to analyze the impact of these predictors on the patients' prognosis. METHODS: A retrospective analysis was conducted on 332 adult patients who were diagnosed with AMI-CS and admitted to the ICU for the first time within the eICU Collaborative Research Database (eICU-CRD). AdaBoost, XGBoost, LightGBM, Random Forest and logistic regression nomogram were developed utilizing the random forest recursive elimination (RF-RFE) and least absolute shrinkage and selection operator (LASSO) algorithms for feature selection. RESULTS: Compared to the machine learning models, the nomogram demonstrated superior predictive accuracy for mortality in patients with AMI-CS, with an AUC value of 0.869 (95% CI: 0.803, 0.883) and an F1 score of 0.897 for the internal test set of nomogram, and an AUC of 0.770 (95% CI: 0.702, 0.801) and an F1 score of 0.832 for the external validation set. CONCLUSIONS: Nomogram enhance the interpretability and transparency of the models, leading to more reliable prognostic predictions for AMI-CS patients. This facilitates clinicians in making precise decisions, thereby enhancing patient prognosis.