Background. In traditional Chinese medicine (TCM), TCM syndrome is a key guideline, and Chinese materia medicas are widely used to treat hepatitis B virus- (HBV-) related hepatocellular carcinoma (HCC) according to different TCM syndromes. However, the prognostic value of TCM syndromes in HBV-related HCC patients has never been studied. Methods. A retrospective cohort of HBV-related HCC patients at Shenzhen Traditional Chinese Medicine Hospital from December 2005 to October 2017 was analyzed. The prognostic value of TCM syndromes in HBV-related HCC patients was assessed by Kaplan–Meier survival curves and Cox analysis, and the TCM syndrome with the best prognosis of HBV-related HCC patients was determined. To further study the relevant mechanisms, key Chinese materia medicas (KCMMs) for the TCM syndrome with the best prognosis were summarized, and network pharmacology was also performed. Results. A total of 207 HBV-related HCC patients were included in this research, and we found that HBV-related HCC patients with TCM excess syndrome had better OS. Then, a total of eight KCMMs for TCM excess syndrome were identified, whose crucial ingredients included quercetin, beta-sitosterol, kaempferol, luteolin, and XH-14, and KCMMs could play a therapeutic role through MAPK, JAK-STAT, Wnt, Hippo, and other pathways. Moreover, TP53, SRC, STAT3, MAPK3, PIK3R1, HRAS, VEGFA, HSP90AA1, EGFR, and JAK2 were determined as the key targets. Conclusion. We propose a new research method of “prognosis of TCM syndromes-KCMMs-network pharmacology” to reveal the prognostic value of TCM syndromes and the potential mechanism by which TCM syndromes affect prognosis.