Sorafenib is the recommended first-line treatment option for patients with advanced hepatocellular carcinoma (HCC). Hepatitis C virus (HCV)-related advanced HCC (HCV-HCC) seemed to have a better response than hepatitis B virus (HBV)-related HCC (HBV-HCC) in sorafenib use, but it was undetermined. Hence, we aimed to investigate the effect of sorafenib between HBV-HCC and HCV-HCC patients in Taiwan. From August 2012 to December 2016, 575 consecutive advanced HCC patients received sorafenib under the reimbursement of Taiwan national health insurance in our hospital. Radiologic assessment was performed at a 2-month interval.Those patients with tumor progression or liver function deterioration were disallowed for further sorafenib use. Patients with HBV or HCV infection were, retrospectively, enrolled and followed till December 2018. There were 277 (62.4%) HBV-HCC patients and 167 (37.6%) HCV-HCC patients. Before sorafenib, 192 (69.3%) HBV-HCC patients who had used nucleoside analogs (NAs) for HBV management, whereas only 5 (3%) HCV-HCC patients received interferon-based antiviral therapy.Overall survival (OS) of HCV-HCC patients was significantly superior to HBV-HCC patients without NAs (8.8 months vs. 4.9 months, p = 0.006), but was noninferior to HBV-HCC patients with NAs (8.8 months vs. 10.7 months, p = 0.54). Using propensity score matching, progression-free survival (2.0 months vs. 2.1 months, p = 0.374) and OS (10.5 months vs. 9.6 months, p = 0.746) between HBV-HCC and HCV-HCC groups were not different. Antiviral therapy might increase survival benefits of advanced HBV-HCC patients underwent sorafenib use, leading to a comparable OS to HCV-HCC patients in Taiwan.