Mac-2 binding protein glycosylation isomer (M2BPGi) has not been used in a risk score to predict hepatocellular carcinoma (HCC). We enrolled 1003 patients with chronic hepatitis B and cirrhosis receiving entecavir or tenofovir therapy for more than12 months to construct an HCC risk score. In the development cohort, Cox regression analysis identified male gender, age, platelet count, AFP and M2BPGi levels at 12 months of treatment as independent risk factors of HCC. We developed the HCC risk prediction model, the ASPAM-B score, based on age, sex, platelet count, AFP and M2BPGi levels at 12 months of treatment, with the total scores ranging from 0 to 11.5. This risk model accurately classified patients into low (0–3.5), medium (4–7), and high (>7) risk in the development and validation groups (p < 0.001). The areas under the receiver operating characteristic curve (AUROC) of 3-, 5- and 9-year risks of HCC were 0.742, 0.728 and 0.719, respectively, in the development cohort. All AUROC between the ASPAM-B and APA-B, PAGE-B, RWS-HCC and THRI scores at 3–9 years were significantly different. The M2BPGi-based risk model exhibited good discriminant function in predicting HCC in cirrhotic patients who received long-term antiviral treatment.