Immune-checkpoint inhibitors (ICIs) are now widely used for the treatment of patients with advanced-stage hepatocellular carcinoma (HCC). Two different ICI-containing regimens, atezolizumab plus bevacizumab and tremelimumab plus durvalumab, are now approved standard-of-care first-line therapies in this setting. However, and despite substantial improvements in survival outcomes relative to sorafenib, most patients with advanced-stage HCC do not derive durable benefit from these regimens. Advances in genome sequencing including the use of single-cell RNA sequencing (both of tumour material and blood samples), as well as immune cell identification strategies and other techniques such as radiomics and analysis of the microbiota, have created considerable potential for the identification of novel predictive biomarkers enabling the accurate selection of patients who are most likely to derive benefit from ICIs. In this Review, we summarize data on the immunology of HCC and the outcomes in patients receiving ICIs for the treatment of this disease. We then provide an overview of current biomarker use and developments in the past 5 years, including gene signatures, circulating tumour cells, high-dimensional flow cytometry, single-cell RNA sequencing as well as approaches involving the microbiome, radiomics and clinical markers. Novel concepts for further biomarker development in HCC are then discussed including biomarker-driven trials, spatial transcriptomics and integrated ‘big data’ analysis approaches. These concepts all have the potential to better identify patients who are most likely to benefit from ICIs and to promote the development of new treatment approaches.