Objective To examine the relationship between admission random blood glucose (RBG), fasting blood glucose (FBG), and Gensini score in patients with acute myocardial infarction (AMI) to clarify the effects of RBG and FBG on the severity of coronary artery disease. Method A total of 958 consecutive AMI patients who underwent emergency coronary angiography at the Cardiology Department of Zhongda Hospital (affiliated with Southeast University) were enrolled in this study from January 1, 2016, to December 31, 2018. The Gensini score of each patient was calculated according to the results of coronary angiography. The RBG, FBG, baseline data, hematological indexes, echocardiography parameters, coronary angiography data, and the use of intra-aortic balloon pump (IABP) were recorded. Patients with an RBG level >11.1 mmol/L were classified into the stress hyperglycemia group, and those with an FBG level >7.0 mmol/L were classified into the elevated FBG group. The Gensini scores in the stress hyperglycemia and elevated FBG groups were compared to those in the control group, and correlations between the RBG and FBG levels and the Gensini scores of AMI patients were evaluated. Independent risk factors for the Gensini score were analyzed by multiple linear and multiple logistic regression analyses. Results The Gensini scores of the stress hyperglycemia group and the elevated FBG group were higher than those of the control group. RBG and FBG were positively correlated with the Gensini score, and there were significant differences between RBG and FBG in different Gensini score groups. After adjusting for confounding factors, multiple linear regression analysis showed that sex, diabetes, estimated glomerular filtration rate (eGFR), and FBG were independent risk factors for the Gensini score. Multiple logistic regression analysis showed that age and FBG were independent risk factors in group 2 compared to group 1, eGFR and FBG were independent risk factors in group 3, and eGFR and FBG were independent risk factors in group 4. Diabetes and RBG were not independent risk factors for the Gensini score. Conclusion The Gensini scores of patients in the stress hyperglycemia group and the elevated FBG group were significantly higher than those in the control group. RBG and FBG were positively correlated with the Gensini score in AMI patients, and FBG was an independent risk factor for the Gensini score in AMI patients.