Hepatic ischemia/reperfusion injury (HIRI) is a common and inevitable factor leading to poor prognosis in various liver diseases, making the outcomes of current treatments in clinic unsatisfactory. Metformin has been demonstrated to be beneficial to alleviate HIRI in recent studies, however, the underpinning mechanism remains unclear. In this study, we found metformin mitigates HIRI-induced ferroptosis through reshaped gut microbiota in mice, which was confirmed by the results of fecal microbiota transplantation treatment but showed the elimination of the beneficial effects when gut bacteria were depleted using antibiotics. Detailedly, through 16S rRNA and metagenomic sequencing, we identified that the metformin-reshaped microbiota was characterized by the increase of gamma-aminobutyric acid (GABA) producing bacteria. This increase was further confirmed by the elevation of GABA synthesis key enzymes, glutamic acid decarboxylase and putrescine aminotransferase, in gut microbes of metformin-treated mice and healthy volunteers. Furthermore, the benefit of GABA against HIRI-induced ferroptosis was demonstrated in GABA-treated mice. Collectively, our data indicate that metformin can mitigate HIRI-induced ferroptosis by reshaped gut microbiota, with GABA identified as a key metabolite.