Purpose Following the Sorafenib Hepatocellular Carcinoma Assessment Randomized Protocol (SHARP) trial, sorafenib has become the standard of care for patients with advanced unresectable hepatocellular carcinoma, but the relation between survival advantage and disease etiology remains unclear. To address this, we undertook an individual patient data meta-analysis of three large prospective randomized trials in which sorafenib was the control arm. Methods Of a total of 3,256 patients, 1,643 (50%) who received sorafenib were available. The primary end point was overall survival (OS). A Bayesian hierarchical approach for individual patient data meta-analyses was applied using a piecewise exponential model. Results are presented in terms of hazard ratios comparing sorafenib with alternative therapies according to hepatitis C virus (HCV) or hepatitis B virus (HBV) status. Results Hazard ratios show improved OS for sorafenib in patients who are both HBV negative and HCV positive (log [hazard ratio], -0.27; 95% CI, -0.46 to -0.06). Median unadjusted survival is 12.6 (11.15 to 13.8) months for sorafenib and 10.2 (8.88 to 12.2) months for "other" treatments in this subgroup. There was no evidence of improvement in OS for any other patient subgroups defined by HBV and HCV. Results were consistent across all trials with heterogeneity assessed using Cochran's Q statistic. Conclusion There is consistent evidence that the effect of sorafenib on OS is dependent on patients' hepatitis status. There is an improved OS for patients negative for HBV and positive for HCV when treated with sorafenib. There was no evidence of any improvement in OS attributable to sorafenib for patients positive for HBV and negative for HCV.