Abstract Background and Aim Magnetic resonance elastography (MRE) is used for the evaluation of liver fibrosis; however, it remains unclear whether MRE‐based liver stiffness is associated with hepatocellular carcinoma (HCC) development, particularly in patients with chronic hepatitis B. Methods A total of 504 patients with chronic hepatitis B receiving MRE were enrolled. The primary endpoint was the association between MRE‐based liver stiffness and HCC. Results In a cross‐sectional analysis at the time of MRE measurement, the median (interquartile range) liver stiffness values in patients with presence or history of HCC and those without HCC were 3.68 (2.89–4.96) and 2.60 (2.22–3.45) kPa, respectively, and liver stiffness was significantly higher in patients with presence or history of HCC than in those without HCC (P < 0.001). In a longitudinal analysis of patients without HCC, the 1‐, 3‐, and 5‐year cumulative incidence of HCC in patients with liver stiffness ≥3.6 kPa and those with liver stiffness <3.6 kPa were 3.8%, 7.0%, and 22.9%, and 0%, 0.9%, and 1.5%, respectively (P < 0.001). In the multivariable analysis, MRE‐based liver stiffness (per 1 kPa) or liver stiffness ≥3.6 kPa was an independent factor for HCC development with an adjusted hazard ratio (aHR) of 1.61 (95% confidence interval [CI], 1.3–2.0) or aHR of 8.22 (95% CI, 2.1–31). Conclusion MRE‐based liver stiffness is associated with HCC risk in patients with chronic hepatitis B and may be used for the early prediction of HCC development and determination of indications for treatment.