Blocking the interaction between PD-1 and its ligands is a promising treatment strategy for advanced hepatocellular carcinoma. This study aimed to assess the antitumour activity and safety of the anti-PD-1 inhibitor camrelizumab in pretreated patients with advanced hepatocellular carcinoma.This is a multicentre, open-label, parallel-group, randomised, phase 2 trial done at 13 study sites in China. Eligible patients were aged 18 years and older with a histological or cytological diagnosis of advanced hepatocellular carcinoma, had progressed on or were intolerant to previous systemic treatment, and had an Eastern Cooperative Oncology Group performance score of 0-1. Patients were randomly assigned (1:1) to receive camrelizumab 3 mg/kg intravenously every 2 or 3 weeks, via a centralised interactive web-response system using block randomisation (block size of four). The primary endpoints were objective response (per blinded independent central review) and 6-month overall survival, in all randomly assigned patients who had at least one dose of study treatment. Safety was analysed in all treated patients. This study is registered with ClinicalTrials.gov, number NCT02989922, and follow-up is ongoing, but enrolment is closed.Between Nov 15, 2016, and Nov 16, 2017, 303 patients were screened for eligibility, of whom 220 eligible patients were randomly assigned and among whom 217 received camrelizumab (109 patients were given treatment every 2 weeks and 108 every 3 weeks). Median follow-up was 125 months (IQR 57-155). Objective response was reported in 32 (147%; 95% CI 103-202) of 217 patients. The overall survival probability at 6 months was 744% (95% CI 680-797)]. Grade 3 or 4 treatment-related adverse events occurred in 47 (22%) of 217 patients; the most common were increased aspartate aminotransferase (ten [5%]) and decreased neutrophil count (seven [3%]). Two deaths were judged by the investigators to be potentially treatment-related (one due to liver dysfunction and one due to multiple organ failure).Camrelizumab showed antitumour activity in pretreated Chinese patients with advanced hepatocellular carcinoma, with manageable toxicities, and might represent a new treatment option for these patients.Jiangsu Hengrui Medicine.