To reveal the effects of Oldenlandia diffusa (OD) on relieving the progression and development of gestational diabetes mellitus (GDM), and explore the underlying mechanism. A rat model of GDM was established by streptozotocin injection. The effects of OD on GDM rats were evaluated by measuring the levels of fasting blood glucose (FBG), insulin, and hemoglobin A1c (HbA1c), and exposing to oral glucose tolerance test (OGTT) and histological evaluation of the pancreas. The levels of insulin and inflammation response-related factors (tumor necrosis factor [TNF]-α, Interleukin [IL]-6 and IL-1β) were evaluated by enzyme-linked immunosorbent assay (ELISA). Additionally, immunoblot assay was performed to investigate the effects of OD on the nuclear factor-κb (NF-κB) pathway and 5' adenosine monophosphate-activated protein kinase (AMPK) pathway. OD decreased blood glucose level, pancreatic tissue damage, and insulin secretion in GDM rats. OD also reduced serum inflammatory levels (TNF-α, IL-6, and IL-1β) in GDM rats. Mechanically, OD could inhibit NF-κB pathway and activate AMPK pathway in the pancreatic tissue of GDM rats. OD affected glucose metabolism and inflammation level in rats with streptozotocin-induced GDM, and the underlying mechanism was through AMPK pathway. OD might serve as a promising and potential drug for the treatment of GDM.