Traditional Chinese medicine (TCM) has been used to treat tumors for years and has been demonstrated to be effective. However, the underlying molecular mechanisms of herbs remain unclear. This study aims to ascertain molecular targets of herbs prolonging survival time of patients with advanced hepatocellular carcinoma (HCC) based on network pharmacology, and to establish a research method for accurate treatment of TCM. The survival benefit of TCM treatment with Chinese herbal medicine (CHM) was proved by Kaplan-Meier method and Cox regression analysis among 288 patients. The correlation between herbs and survival time was performed by bivariate correlation analysis. Network pharmacology method was utilized to construct the active ingredient-target networks of herbs that were responsible for the beneficial effects against HCC. Cox regression analysis showed CHM was an independent favorable prognostic factor. The median survival time was 13 months and the 5-year overall survival rates were 2.61% in the TCM group, while there were 6 months, 0 in the non-TCM group. Correlation analysis demonstrated that 8 herbs closely associated with prognosis. Network pharmacology analysis revealed that the 8 herbs regulated multiple HCC relative genes, among which the genes affected proliferation (KRAS, AKT2, MAPK), metastasis (SRC, MMP), angiogenesis (PTGS2) and apoptosis (CASP3) etc.