Prediction of hepatocellular carcinoma (HCC) risk is an urgent unmet need in patients with nonalcoholic fatty liver disease (NAFLD). In cohorts of 409 patients with NAFLD from multiple global regions, we defined and validated hepatic transcriptome and serum secretome signatures predictive of long-term HCC risk in patients with NAFLD. A 133-gene signature, prognostic liver signature (PLS)-NAFLD, predicted incident HCC over up to 15 years of longitudinal observation. High-risk PLS-NAFLD was associated with IDO1+ dendritic cells and dysfunctional CD8+ T cells in fibrotic portal tracts along with impaired metabolic regulators. PLS-NAFLD was validated in independent cohorts of patients with NAFLD who were HCC naïve (HCC incidence rates at 15 years were 22.7 and 0% in high- and low-risk patients, respectively) or HCC experienced (de novo HCC recurrence rates at 5 years were 71.8 and 42.9% in high- and low-risk patients, respectively). PLS-NAFLD was bioinformatically translated into a four-protein secretome signature, PLSec-NAFLD, which was validated in an independent cohort of HCC-naïve patients with NAFLD and cirrhosis (HCC incidence rates at 15 years were 37.6 and 0% in high- and low-risk patients, respectively). Combination of PLSec-NAFLD with our previously defined etiology-agnostic PLSec-AFP yielded improved HCC risk stratification. PLS-NAFLD was modified by bariatric surgery, lipophilic statin, and IDO1 inhibitor, suggesting that the signature can be used for drug discovery and as a surrogate end point in HCC chemoprevention clinical trials. Collectively, PLS/PLSec-NAFLD may enable NAFLD-specific HCC risk prediction and facilitate clinical translation of NAFLD-directed HCC chemoprevention.