Currently, there is evidence that alteration in the gut ecosystem contributes to the development of liver diseases, however, the complex mechanisms involved are still unclear. We induced cholestasis in mice by bile duct ligation (BDL), mirroring the phenotype of a bile duct obstruction, to understand how gut microbiota alterations caused by an impaired flow of bile acid to the gut contribute to the pathogenesis and progression of liver disease. We performed longitudinal stool, heart, and liver sampling using mice receiving BDL and controls receiving sham operation (ShamOP). Shotgun metagenomics profiling using fecal samples taken before and on day 1, day 3, and day 7 after surgery was performed, and the cytokines and clinical chemistry profiles from heart blood, as well as the liver bile acids profile, were measured. The BDL surgery reshaped the microbiome of mice, resulting in highly distinct characteristics compared to the ShamOP. Our analysis of the microbiome pathways and ECs revealed that BDL reduces the production of hepatoprotective compounds in the gut, such as biotin, spermidine, arginine, and ornithine, which were negatively associated with inflammatory cytokines (IL-6, IL-23, MCP-1). The reduction of the functional potential of the gut microbiota in producing those hepatoprotective compounds is associated with the decrease of beneficial bacteria species fromAnaerotruncus,Blautia,Eubacterium, andLachnoclostridiumgenera, as well as the increase of disease-associated bacteria e.g.,Escherichia coliandEntercoccus faecalis. Our findings advances our knowledge of the gut microbiome-bile acids-liver triangle, which may serve as a potential therapeutic strategy for liver diseases.