Background: Type 2 diabetes mellitus is known as a major risk factor of acute coronary syndrome (ACS) as previous studies reported. However, the association between prediabetes and ACS is not fully investigated among patients with stable coronary artery disease (CAD). Furthermore, no study has examined whether there’s effect modification by sex, age and BMI in the association between glycemic disorder and ACS. Our study aimed to evaluate the role of glycemic disorder in ACS occurrence among patients CAD. Methods: In this cross-sectional study based on electronic medical records (EMR), participants with CAD after elective coronary artery angiography (CAG) during 2016-2020 were enrolled. Diagnosis of prediabetes was based on patients’ HbA1c level ranging from 5.7% to 6.4% or fasting plasma glucose (FPG) level between 5.6 - 6.9 mmol/L. The diabetes diagnosis was defined as HbA1c ≥6.5% or fasting plasma glucose (FPG) ≥7.0 mmol/L. Multivariable logistic regression models were built to evaluate the association between prediabetes, diabetes and ACS, adjusting for age, body mass index (BMI), hypertension, low density lipoprotein, triglyceride level, statin and anti-platelet medication use. Subjects with prediabetes were matched 1:1 to healthy controls using propensity score matching to test the robustness of the result. In the subgroup analysis, we examined the heterogeneity of age, sex and BMI in the association between glycemic disorders and ACS. Results: Among 1525 participants, 1158 were male and 367 were female. Compared to participants with no diabetes, those with prediabetic were not significantly associated ACS, after adjusting for potential confounders. The result persisted after 1:1 propensity score matching. There was effect modification by sex in the association between glycemic disorders and ACS (P glycemic disorder*sex = 0.012). Female participants with diabetes, compared to those without diabetes, were positively associated with ACS (OR 2.00, 95% CI 1.00 - 3.98). The association between glycemic disorders and ACS remained stable among those with severe coronary stenosis. Conclusions: Our finding suggested that the association between prediabetes and ACS did not differ from those with normal glycemic status and CAD. The association remained consistent among those with severe coronary stenosis. Besides, sex modifies the association, and female participants with diabetes should be paid attention to their higher risk of ACS.