This current study aimed to investigate the relationship between the triglyceride-glucose (TyG) index and in-hospital all-cause mortality of coronary artery disease (CAD) in patients with different glucose metabolic statuses. Participants were divided into three groups according to tertiles of the TyG index. Glucose metabolic status was classified as normal glucose regulation, pre-diabetes mellitus, and diabetes mellitus (DM). The primary outcome was in hospital all-cause mortality. We observed a significant relationship between the TyG index and in-hospital deaths of patients with CAD in this study. After adjusting for multiple factors in the logistic regression model, the TyG index was still an independent risk factor, and the T3 group (OR, 2.311; 95% CI = 1.237-4.317; P = 0.009) was correlated with a 2.311-fold risk compared with the T1 group. In the subgroup analysis of different glucose metabolic status, the T3 group (OR, 1.541; 95% CI: 1.013-2.344; P = 0.043) were associated with a significantly higher risk of in-hospital deaths in CAD patients with DM. An increased TyG index was correlated with a higher risk of in-hospital all-cause mortality. Our study indicated that TyG index could be a valuable predictor of in-hospital death of CAD patients, especially for individuals with DM.