Gestational diabetes mechanism is related to lipid metabolism and insulin resistance, but its mechanism of action still needs to be explored. Whether the mechanism for astragalus polysaccharides in the treatment of gestational diabetes is related to the above factors is worth studying. 100 SD rats were in this study selected, in which 10 were set in the control group, and the rest were separated into groups, namely; positive control group, model group, low-dose group, middle-dose group, and high-dose group with 10 rats each. AMP-activated protein kinase (AMPK) pathway inhibitor group (inhibitor group) and AMPK pathway agonist group (agonist group) were then set respectively. In the model group, Adiponectin (APN), superoxide dismutase (SOD), insulin resistance index (ISI), high-density lipoprotein (HDL) and p-AMPK were lowest, and TNF-a, Leptin, MDA, TG, TC, LDL, FBG, FINS, IS, IRI, and protein-tyrosine Phosphatase 1B (PTP1B) expressions were highest. The APN, SOD, HDL levels, ISI index, and p-AMPK from the control group were highest, while the positive control group had lower p-AMPK expression. TNF-a, Leptin, MDA, TG, TC, LDL levels, FBG, and expressions of FINS, IS index, IRI index, and PTP1B were lowest (p < 0.05). The model group, agonist p-AMPK expression, HDL level, ISI index were lowest. PTP1B, TG, TC, LDL level, IS, IRI index expressions were the highest; while the control group, inhibitor group p-AMPK expression, HDL level, ISI index were highest. The PTP1B expression, TG, TC, LDL levels, IS, and IRI index were the lowest, while the positive control group had low expression of p-AMPK. Astragalus polysaccharides can therefore promote AMPK phosphorylation by inhibiting the expression of PTP1B protein to reduce insulin resistance and improve lipid metabolism.