There are reports indicating that licochalcones can inhibit the proliferation, migration, and invasion of cancer cells by promoting the expression of autophagy-related proteins, inhibiting the expression of cell cycle proteins and angiogenic factors, and regulating autophagy and apoptosis. This study aims to reveal the potential mechanisms of licochalcone A (LCA), licochalcone B (LCB), licochalcone C (LCC), licochalcone D (LCD), licochalcone E (LCE), licochalcone F (LCF), and licochalcone G (LCG) inhibition in liver cancer through computer-aided screening strategies. By using machine learning clustering analysis to search for other structurally similar components in licorice, quantitative calculations were conducted to collect the structural commonalities of these components related to liver cancer and to identify key residues involved in the interactions between small molecules and key target proteins. Our research results show that the seven licochalcones molecules interfere with the cancer signaling pathway via the NF-κB signaling pathway, PDL1 expression and PD1 checkpoint pathway in cancer, and others. Glypallichalcone, Echinatin, and 3,4,3′,4′-Tetrahydroxy-2-methoxychalcone in licorice also have similar structures to the seven licochalcones, which may indicate their similar effects. We also identified the key residues (including ASN364, GLY365, TRP366, and TYR485) involved in the interactions between ten flavonoids and the key target protein (nitric oxide synthase 2). In summary, we provide valuable insights into the molecular mechanisms of the anticancer effects of licorice flavonoids, providing new ideas for the design of small molecules for liver cancer drugs.