Objective To investigate the association of stress hyperglycemia ratio(SHR)with the prognosis of patients with acute myocardial infarction(AMI)and type 2 diabetes mellitus(T2DM)after primary percutaneous coronary intervention(PCI).Methods A retrospective analysis was conducted on 112 AMI patients with T2DM who underwent PCI in Putuo People's Hospital from January 2019 to December 2021.Admission glucose and glycosylated hemoglobin(HbA1c)were measured and SHR was calculated.They were divided into survival group and death group based on the outcomes during two years follow-up.SHR was compared between the two groups.Multivariate logistic regression analysis was used to determine the relation between SHR and adverse prognosis.Results Admission glucose and HbA1cwere significantly higher in the death group than in the survival group(both P<0.05).SHR was(1.47±0.38)in the death group,significantly higher than(1.04±0.15)in the survival group(P<0.05).SHR was an independent risk factor for adverse prognosis in patient with AMI and T2DM after primary PCI(P<0.05).The survival rate was significantly lower in patients with high SHR(77.78%,21/27)than in patients with low SHR(91.76%,78/85)(x2=7.577,P=0.006).Conclusion SHR is related to the prognosis of AMI patients with T2DM after PCI.