The only approved systemic therapy for patients with advanced hepatocellular carcinoma (HCC) till now is sorafenib. A preliminary study suggested that capecitabine, an oral fluoropyrimidine, may be effective in advanced HCC. We have tested this hypothesis in this phase 2 study. In this single-center, phase 2, open-label trial, we randomly assigned 52 patients with advanced HCC who had not received previous systemic treatment to receive either sorafenib (at a dose of 400 mg twice daily) or capecitabine (1,000 mg/m(2) twice daily) (day 1-day 14). Primary outcome was progression-free survival. Secondary outcomes included the overall survival and safety. Median overall survival was 7.05 months in the sorafenib group and 5.07 months in the capecitabine group (hazard ratio in the capecitabine group 2.36; 95 % confidence interval 1.174-4.74; P < 0.016). The median progression-free survival was 6 months in the sorafenib group and 4 months in the capecitabine group (P < 0.005). Three patients in the sorafenib group (11.5 %) and one patient in the capecitabine group (3 %) had a partial response; one patient (3 %) had a complete response in the sorafenib group. Hand-foot skin reaction was more frequent in the sorafenib group, hyperbilirubinemia was more common in the capecitabine group, and diarrhea was equivalent between both groups. In patients with advanced HCC, capecitabine is inferior to sorafenib in terms of median progression-free survival and overall survival, and it should not be used alone for the treatment of advanced HCC, but rather, combination therapy with sorafenib should be considered.