Objective To investigate the relationship between the level of prognostic nutritional index (PNI) and 28-day mortality in patients after cardiopulmonary resuscitation. Methods A total of 955 patients admitted to intensive care unit after cardiopulmonary resuscitation between 2008 and 2019 were selected from the MIMIC-IV database and grouped according to the optimal cut-off value of PNI for retrospective cohort analysis. Primary outcome was defined as 28-day all-cause mortality. After adjusting for confounding factors by propensity score matching, the outcomes between high PNI and low PNI groups were compared. PNI and Sequential Organ Failure Assessment (SOFA) score were incorporated into a Cox proportional risk model to construct a predictive model, and the predictive effect was assessed using the concordance index, the net reclassification index, and the integrated discriminant improvement. Results After propensity score matching, compared with the high PNI group, the low PNI group had lower 28-day survival (P<0.001), higher doses of vasoactive drugs used during intensive care unit stay (P<0.001), higher SOFA score (P<0.001) and higher Logistic Organ Dysfunction System score (P=0.002). The admission PNI and SOFA score had similar predictive effects on 28-day mortality, with the area under the receiver operating characteristic curve of 0.639 and 0.638, respectively. In addition, compared with SOFA score alone, PNI combined with SOFA score improved the predictive performance, with an area under the curve of 0.673, the concordance index increasing from 0.598 to 0.622, and the net reclassification index and the integrated discriminant improvement estimates of 0.144 (P<0.001) and 0.027 (P<0.001), respectively. Conclusions PNI can be used as a new predictor of all-cause death risk within 28 days after cardiopulmonary resuscitation. SOFA score combined with PNI can improve the prediction effect.