Background: We aim to find out the relationship between random blood glucose (RBG), fasting blood glucose (FBG) and in-hospital adverse events in ST-segment elevation acute myocardial infarction (STEMI) patients. We evaluate and compare the predictive value of RBG and FBG on in-hospital adverse events, and give an appropriate cutoff value of RBG and FBG. Method: A retrospective study enrolled 958 consecutive AMI patients undergoing emergency coronary angiography at Zhongda Hospital were enrolled from January 1, 2016, to December 31, 2018 was performed. RBG and FBG, baseline data and adverse events were recorded. Major adverse cardiovascular and cerebrovascular events (MACCE) were defined as death, nonfatal recurrent myocardial infarction and stroke. Other adverse events included malignant arrhythmia, cardiac shock and hemorrhage. Patients with RBG > 11.1 mmol/L were divided into elevated RBG group. Patients with FBG > 6.1 mmol/L were divided into elevated FBG group. The incidence of in-hospital adverse events were compared in elevated RBG/FBG group and the control group. ROC curve was used to evaluate the predictive value of RBG and FBG on in-hospital adverse events. Result: The incidence of death, hemorrhage, cardiac shock and malignant arrhythmia significantly increases in elevated RBG and FBG group. Binary logistic regression showed that age, hypertension, diabetes, FBG and RBG were independent risk factors for in-hospital adverse events in STEMI patients. The AUC and 95% CI of RBG and FBG in predicting death of AMI patients were 0.789, 0.759~0.816; 0.810, 0.783~0.835, respectively. The cutoff values were 13.82 and 7.35 mmol/L. RBG and FBG also had fine predictive value on cardiac shock and malignant arrhythmia, no statistical difference was found in the predictive value on in-hospital adverse events (P = 0.462, P = 0.570, P = 0.694). Conclusion: Incidence of in-hospital adverse events significantly increases in AMI patients combined with elevated RBG or FBG. Both RBG and FBG were independent risk factors for in-hospital adverse events, they had good value on predicting in-hospital adverse events and there was no statistical difference in their predictive value.