Objective: To recognize risk factors and build up and validate a simple risk model predicting 8-year cancer events after nonalcoholic fatty liver disease (NAFLD). Methods: This was a retrospective cohort study. Patients with NAFLD (n = 5561) were randomly divided into groups: training (n = 1254), test (n = 627), evaluation (n = 627), and validation (n = 3053). Risk factors were recognized by statistical method named as a Cox model with Markov chain Monte Carlo (MCMC) simulation.This prediction score was established based on the training group and was further validated based on the testing and evaluation group from Results: The main outcomes were NAFLD-related cancer events, including those of the liver, breast, esophagus, stomach, pancreas, prostate and colon, within 8 years after hospitalization for NAFLD diagnosis. Seven risk factors (age (every 5 years),LDL, smoking, BMI, diabetes, OSAS, and aspartate aminotransferase (every 5 units)) were identified as independent indicators of cancer events. This risk model contained a predictive range of 0.4%-37.7%, 0.3%-39.6%, and 0.4%-39.3% in the training, test, evaluation group, respectively, with a range 0.4%-30.4% for validation groups. In the training group, 12.6%, 76.9%, and 10.5% of patients, which corresponded to the low -, moderate -, and high-risk groups, had probabilities of, <0.01, <0.1, and 0.23 for 8-year events.