The relationship between the triglyceride-glucose (TyG) index and mortality among survivors of myocardial infarction (MI) remains understudied. This study aims to evaluate the association between the TyG index and mortality among adult MI patients in the US. Our study included 986 MI patients, sourced from the National Health and Nutrition Examination Survey conducted from 1999 to 2018. Employing a multivariate Cox proportional hazards model, we examined the association between the TyG index and mortality. To explore potential nonlinear relationships, we employed restricted cubic splines in our analysis. Additionally, we applied a two-piecewise Cox proportional hazards model for a more nuanced analysis of the data, using key turning points as boundaries. To validate the robustness of our research findings, we also performed subgroup analyses. During a 7,342 person-years follow-up period, 434 MI survivors succumbed to various causes, including 158 cardiovascular disease-related deaths. The study revealed a U-shaped pattern between the TyG index and mortality. At TyG index levels below the thresholds (8.85 for all-cause mortality and 9.02 for cardiovascular mortality), mortality exhibited a negative correlation with the TyG index (HR = 0.56, 95%CI 0.39–0.82; HR = 0.67, 95%CI 0.39–1.14). Conversely, mortality rates increased when the TyG index surpassed these thresholds (HR = 1.38, 95%CI 1.08–1.76; HR = 1.56, 95%CI 1.02–2.38). Furthermore, among diabetic patients, subgroup analyses demonstrated that the U-shaped pattern between the TyG index and cardiovascular mortality was particularly pronounced. Our research indicates that among MI survivors, a U-shaped pattern exists between the TyG index and mortality rates, which is particularly pronounced in the diabetic patient subgroup. The corresponding threshold values for all-cause and cardiovascular mortality are 8.85 and 9.02, respectively.