Hepatocyte nuclear factor-1beta (HNF-1B) is involved in the hepatobiliary specification of hepatoblasts to cholangiocytes during liver development, and is strongly expressed throughout adult biliary epithelium. The aim of this study was to examine the expression of HNF-1B in different pathologic subtypes of primary liver cancer, including hepatocellular carcinoma (HCC) and cholangiocarcinoma (ICC), and the relationship between HNF-1B expression, clinicopathological features and prognosis. We retrospectively investigated 2 cohorts of patients, including 183 HCCs and 69 ICCs. The expression of HNF-1B was examined by immunohistochemistry. We found that HNF-1B expression was associated with pathological subtype of primary tumor, and HNF-1B expression in HCC tissue may be associated with the change of phenotype on recurrence. The HNF-1B expression was positively correlated with biliary/HPC (hepatic progenitor cell) markers expression. Further, multivariable analysis showed that HNF-1B expression was an independent prognostic factor for both overall survival and disease-free survival of HCC patients. However, no correlation between HNF-1B expression and survival was found in ICC patients. In summary, HCC with high HNF-1B expression displayed biliary phenotype and tended to show poorer prognosis. HNF-1B-positive malignant cells could be bipotential cells and give rise to both hepatocytic and cholangiocytic lineages during tumorigenesis.