Purpose: Metformin (Met) is widely used to treat a variety of diseases, but its role in ulcerative colitis (UC) has not been fully elucidated. This study aimed to clarify the effect of Met on UC, exploring its relationship with NLRP3 inflammasome and elucidating the potential mechanisms. Methods: C57BL/6J mice were administrated with DSS solution to establish UC model. Disease Activity Index (DAI) and hematoxylin and eosin staining (HE) were performed to evaluate the impact of Met on UC model. Enzyme-linked immunosorbent chemistry, and immunofluorescence were used to detect NLRP3 inflammasome activation in vivo. Furthermore, in vitro, bone marrowderived macrophages (BMDMs) selected to clarify the role of Met on NLRP3 inflammasome activation and the underlying mechanisms. Results: In vivo, Met could significantly inhibit the development of UC, characterized by decreased DAI, increased body weight and colorectal length, and the repair of damaged tissue. Met could also block macrophage infiltration and subsequently reduced the level of IL-1 beta, NLRP3, and Caspase-1 in the colorectal tissue, which were mainly expressed by macrophages. In addition, the level of IL-1 beta in serum was remarkedly down-regulated by Met. In vitro, Met could inhibit NLRP3 inflammasome activation and subsequently dampen the maturation of pro-caspase-1 and pro-IL-1 beta. Moreover, Met could simultaneously suppress the activation of NF-kappa B/p65 signaling pathway and disrupt the formation of ASC speck. At last, Met exhibited an anti-oxidant effect, along with upregulating the level of UCP2 and NCF1. Conclusion: Met significantly ameliorated UC by inhibiting NLRP3 inflammasome activation in macrophages. The underlying mechanisms not only involved the inhibition of NF-kappa B signaling pathway activation (first signal), but was also associated with upregulation of UCP2 and NCF1 levels and thus the repression of ROS generation (second signal).