Background and aimsHepatic sinusoidal obstruction syndrome (HSOS) is caused by toxic injury, such as pyrrolizidine alkaloids, to the liver sinusoidal endothelial cells, and the gut microbiota may be involved. However, the specific role and underlying mechanism of gut microbiota in HSOS is unknown.MethodsHSOS model was established by gavage of monocrotaline (MCT) in rats. Fecal microbiota transplantation (FMT) with HSOS-derived or healthy gut flora was also conducted to validate the role of gut microflora in MCT-induced liver injury. The microbial 16 s rRNA analysis and untargeted metabolomics analysis in the faeces were performed to identify HSOS-related flora and metabolites. Finally, by supplementation with specific tryptophan metabolites, such as indole-3-acetaldehyde (IAAld) and indole acetic acid (IAA), we further confirmed the role of tryptophan metabolism in HSOS and the role of the AhR/Nrf2 pathway in MCT-induced liver injury.ResultsMCT induced HSOS-like liver injury in rats with significantly altered gut microbiota. Particularly, some tryptophan-metabolizing bacteria reduced in MCT-treated rats, such asBacteroides,Bifidobacterium,LactobacillusandClostridium, and accompanied by a decrease in microbial tryptophan metabolic activity and a series of tryptophan derivatives. Restoring the gut microbiota via FMT improved MCT-induced liver damage, while HSOS-derived gut microbiota aggravated the liver injury induced by MCT. Supplementation with microbial tryptophan derivatives (IAAld or IAA), or 6-formylindolo(3,2-b)carbazole (Ficz, an AhR agonist) could activate the AhR/Nrf2 signaling pathway, thereby attenuating the MCT-induced liver oxidative stress and liver sinusoidal endothelial cells injury.ConclusionsGut microbiota plays a critical role in MCT-induced HSOS, with inadequate microbial tryptophan metabolism in the gut and consequently a lower activity of the AhR/Nrf2 signaling pathway in the liver, which should be a potential target for the management of HSOS.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13578-023-01078-4.