Acute phase hyperglycemia and exaggerated glucose fluctuation may be associated with poor outcomes in diabetic patients after acute myocardial infarction (AMI). This study aimed to determine whether intervention by clinical pharmacists can mitigate blood glucose and glucose fluctuations in these fragile patients. This retrospective study enrolled patients with diabetes and AMI, from 1 January 2019 to 30 June 2020 in our institution. Blood glucose and glucose fluctuations were calculated before and after the pharmacist's intervention and between patients who underwent intervention and those who did not. Propensity score matching (PSM) was used to reduce the impact of patient characteristics on the results. A total of 170 patients were included in our primary analysis, including 29 patients who received the pharmacist intervention and 141 patients who did not. After the pharmacist's intervention, blood glucose (fasting blood glucose‐FBG, from 11.9 to 9.8; postprandial blood glucose‐PBG, from 15.3 to 13.2; mean blood glucose‐BG, 14.5 to 12.3 mmol/L; p < .001), and glucose fluctuations (standard deviation of blood glucose‐SDBG, from 3.8 to 3.0, mmol/L, p = .005) were significantly improved. Before PSM, no clear effects were found in intervention versus nonintervention patients, in terms of blood glucose and glucose fluctuation indicators, except for FBG (9.3 vs. 8.0. mmol/L, p = .005). Further analysis indicated a high incidence of FBG <7.8 mmol/L in nonintervention versus intervention patients (51.5% vs. 27.6%, p = .003). After PSM, a significant reduction in blood glucose fluctuation (SDBG, 3.0 vs. 4.1, p = .031; PBGE, 2.1 vs. 4.1, p = .017; LAGE, 4.7 vs. 7.2, mmol/L, p = .004), and PBG (11.1 vs. 13.0, mmol/L, p = .048) was observed in the intervention group than in the nonintervention group. The clinical pharmacist intervention contributed to improved outcomes, specifically, in reducing blood glucose fluctuations and potential hypoglycemia risk.