Hepatocellular carcinoma (HCC) is a highly detrimental cancer type and has limited therapeutic options, posing significant threats to human health. The development of HCC has been associated with a disorder in bile acid (BA) metabolism. In this study, we employed an integrative approach, combining various datasets and omics analyses, to comprehensively characterize the tumor microenvironment in HCC based on genes related to BA metabolism. Our analysis resulted in the classification of HCC samples into four subtypes (C1, C2a, C2b, and C3). Notably, subtype C2a, characterized by the highest bile acid metabolism score (BAMS), exhibited the highest survival probability. This subtype also demonstrated increased immune cell infiltration, lower cell cycle scores, reduced AFP levels, and a lower risk of metastasis compared to subtypes C1 and C3. Subtype C1 displayed poorer survival probability and elevated cell cycle scores. Importantly, the identified subtypes based on BAMS showed potential relevance to the gene expression of drug targets in currently approved drugs and those under clinical research. Genes encoding VEGFR (FLT4 and KDR) and MET were elevated in C2, while genes such as TGFBR1, TGFB1, ADORA3, SRC, BRAF, RET, FLT3, KIT, PDGFRA, and PDGFRB were elevated in C1. Additionally, FGFR2 and FGFR3, along with immune target genes including PDCD1 and CTLA4, were higher in C3. This suggests that subtypes C1, C2, and C3 might represent distinct potential candidates for TGFB1 inhibitors, VEGFR inhibitors, and immune checkpoint blockade treatments, respectively. Significantly, both bulk and single-cell transcriptome analyses unveiled a negative correlation between BA metabolism and cell cycle-related pathways. In vitro experiments further confirmed that the treatment of HCC cell lines with BA receptor agonist ursodeoxycholic acid led to the downregulation of the expression of cell cycle-related genes. Our findings suggest a plausible involvement of BA metabolism in liver carcinogenesis, potentially mediated through the regulation of tumor cell cycles and the immune microenvironment. This preliminary understanding lays the groundwork for future investigations to validate and elucidate the specific mechanisms underlying this potential association. Furthermore, this study provides a novel foundation for future precise molecular typing and the design of systemic clinical trials for HCC therapy.