Background: The combined effects of diabetes mellitus (DM), admission plasma glucose (APG), and glycated hemoglobin (HbA1c) levels on predicting long-term clinical outcomes in patients with ST-segment elevation myocardial infarction (STEMI) undergoing primary percutaneous coronary intervention (pPCI) are unknown. Therefore, we evaluated their combined effects on long-term clinical outcomes in STEMI patients treated with pPCI. Methods: In total, 350 consecutive patients with STEMI undergoing pPCI were enrolled. Patients were divided into 3 groups according to DM history and APG and HbA1c levels. The cumulative rates of 24-month all-cause deaths and major adverse cardiac and cerebrovascular events (MACCEs) were calculated. Results: Both the incidence of all-cause deaths and cumulative rates of MACCEs were significantly the lowest in patients without a DM history and admission HbA1c level < 6.5%. DM patients with poor glycemic control or stress hyperglycemia on admission experienced the highest rates of all-cause deaths, MACCEs, and cardiac deaths. Admission HbA1c levels, Triglyceride (TG) levels, hemoglobin levels, DM history, and admission Killip class > 1 correlated with 24-month all-cause death; HbA1c levels on admission, DM history, APG levels, history of stroke, history of coronary heart disease, and TG levels on admission were significantly associated with MACCEs through the 24-month follow-up. The predictive effects of combining DM and APG and HbA1c levels were such that for STEMI patients undergoing pPCI, DM patients with poor glycemic control or with stress hyperglycemia on admission had worse prognosis than other patients. Conclusion: Strict control of glycemic status may improve the survival of patients who have both DM and coronary heart diseases.