Background: Fibrinogen (FIB) is an independent risk factor for mortality and cardiovascular events in the general population. However, the relationship between FIB and long-term mortality among CAD patients undergoing PCI remains unclear, especially in individuals complicated with diabetes mellitus (DM) or prediabetes (Pre-DM). Methods: 6,140 patients with CAD undergoing PCI were included in the study and subsequently divided into three groups according to FIB levels (FIB-L, FIB-M, FIB-H). These patients were further grouped by glycemic status [normoglycemia (NG), Pre-DM, DM]. The primary endpoint was all-cause mortality. The secondary endpoint was cardiac mortality. Results: FIB was positively associated with hemoglobin A1c (HbA1c) and fasting blood glucose (FBG) in CAD patients with and without DM (P <0.001). During a median follow-up of 5.1 years, elevated FIB was significantly associated with long-term all-cause mortality (adjusted HR: 1.86; 95% CI: 1.28-2.69; P=0.001) and cardiac mortality (adjusted HR: 1.82; 95% CI: 1.15-2.89; P=0.011). Similarly, patients with DM, but not Pre-DM, had increased risk of all-cause and cardiac mortality compared with NG group (all P<0.05). When grouped by both FIB levels and glycemic status, diabetic patients with medium and high FIB levels had higher risk of mortality [(adjusted HR: 2.57; 95% CI: 1.12-5.89), (adjusted HR: 3.04; 95% CI: 1.35-6.82), all P<0.05]. Notably, prediabetic patients with high FIB also had higher mortality risk (adjusted HR: 2.27; 95% CI: 1.01-5.12). Conclusions: FIB was strongly associated with long-term all-cause and cardiac mortality among CAD patients undergoing PCI, especially in those with DM and Pre-DM. FIB test may help to identify high-risk individuals in this specific population.