Sorafenib is currently the first‐line therapy for advanced hepatocellular carcinoma (aHCC) patients. However, the outcomes and prognostic factors of sorafenib therapy have not been well investigated. We aimed to investigate the pretreatment factors and outcomes among Taiwanese aHCC patients receiving sorafenib treatment. A total of 347 patients with aHCC and well‐compensated liver cirrhosis (Child‐Pugh A) status receiving sorafenib were consecutively enrolled from March 2013 through December 2016. Pre‐treatment clinical data and viral hepatitis markers were collected and analyzed with their outcomes. The primary endpoint of the study was overall survival. The factors associated with overall survival were also investigated. The median overall survival of all the patients was 238 days (range, 9‐1504 days) with a 1‐year overall survival of 43.2%. Positive hepatitis B surface antigen and absence of portal vein thrombosis (PVT) were independent factors associated with better overall survival. The median duration of sorafenib therapy was 93.0 days (range, 4‐1504 days). After stopping sorafenib, the median survival was 93.0 days (range, 1‐1254 days). The 1‐year survival after stopping sorafenib was 21.2%. In chronic hepatitis B patients, total bilirubin level was the only factor associated with overall survival. Hepatitis C antibody RNA negativity, tumor size, PVT, and white blood cell count were the independent factors associated with survival among those chronic hepatitis C patients. There were different prognostic factors stratified by viral etiologies in aHCC patients receiving sorafenib. Viral eradication increased survival in chronic hepatitis C patients.