Celastrol, a triterpene derived from Thunder God Vine (Tripterygium wilfordii Hook f; Celastraceae), a traditional Chinese herb, has promising anticancer activity. The present study aimed to elucidate an indirect mechanism of celastrol-mediated alleviation of hepatocellular carcinoma (HCC) via gut microbiota-regulated bile acid metabolism and downstream signaling. Here, we constructed a rat model of orthotopic HCC and performed 16S rDNA sequencing and UPLC-MS analysis. The results showed that celastrol could regulate gut bacteria; suppress the abundance of Bacteroides fragilis; raise the levels of glycoursodeoxycholic acid (GUDCA), a bile acid; and alleviate HCC. We found that GUDCA suppressed cellular proliferation and induced the arrest of mTOR/S6K1 pathway-associated cell cycle G0/G1 phase in HepG2 cells. Further analyses using molecular simulations, Co-IP, and immunofluorescence assays revealed that GUDCA binds to farnesoid X receptor (FXR) and regulates the interaction of FXR with retinoid X receptor a (RXRα). Transfection experiments using the FXR mutant confirmed that FXR is essential for GUCDA-mediated suppression of HCC cellular proliferation. Finally, animal experiments showed that the treatment with the combination of celastrol/GUDCA alleviated the adverse effects of celastrol alone treatment on body weight loss and improved survival in rats with HCC. In conclusion, the findings of this study suggest that celastrol exerts an alleviating effect on HCC, in part via regulation of the B. fragilis-GUDCA-FXR/RXRα-mTOR axis.