Prenatal exposure to methamphetamine (METH) is an issue of global concern due to its adverse effects on offspring, particularly its impact on liver health, an area still not fully understood. Inulin, a recognized prebiotic, is thought to potentially ameliorate these developmental disorders and toxic injuries in progeny. To investigate the effects of prenatal METH exposure on the liver and the role of gut microbiota, we established a murine model, the subjects of which were exposed to METH prenatally and subsequently treated with inulin. Our findings indicate that prenatal METH exposure causes liver damage in offspring, as evidenced by a decreased liver index, histopathological changes, diminished glycogen synthesis, hepatic dysfunction, and alterations in mRNA profiles. Furthermore, it impairs the antioxidant system and induces oxidative stress, possibly due to changes in cecal microbiota and dysregulation of bile acid homeostasis. However, maternal inulin supplementation appears to restore the gut microbiota in offspring and mitigate the hepatotoxic effects induced by prenatal METH exposure. Our study provides definitive evidence of METH's transgenerational hepatotoxicity and suggests that maternal inulin supplementation could be an effective preventive strategy.