Objective The study aims to investigate the levels of serum NLRP3 along with its effector molecules (Caspase-1, IL-1β, and IL-18) in the mid-pregnancy in pregnant women with hyperglycemia, and explore the relationship between NLRP3, along with its effector molecules (Caspase-1, IL-1β, and IL-18) and insulin resistance, as well as pregnancy outcomes. Methods The levels of serum NLRP3 along with its effector molecules (Caspase-1, IL-1β, and IL-18) in three groups of pregnant women with gestational diabetes mellitus (GDM), pregestational diabetes mellitus (PGDM) and normal glucose tolerance (NGT) were measured in mid-pregnancy, and their relationship with insulin resistance and pregnancy outcomes was analyzed. The ROC curve was also used to evaluate the predictive value of serum NLRP3 inflammasome and its effector molecules for pregnancy outcomes. Results There were no statistical differences in the general clinical data of the three groups, and the concentrations of serum NLRP3 along with its effector molecules were higher in the GDM and PGDM groups than in the NGT group, and NLRP3 along with its effector molecules were positively correlated with fasting blood glucose, fasting insulin, and insulin resistance index in both groups (r > 0, p < .05). The incidence of preterm delivery, hypertensive disorders of pregnancy, premature rupture of membranes, neonatal hypoglycemia and macrosomia was significantly higher in both groups than in the NGT group (p < .05). The value of the combined serum NLRP3 and its effector molecules in mid-pregnancy to predict adverse pregnancy outcomes was highest, and the AUCs for the combined prediction of late hypertensive disorders of pregnancy, premature rupture of membranes, preterm delivery, neonatal hypoglycemia and macrosomia were 0.84 (95% CI 0.79–0.88, p < .001), 0.81 (95% CI 0.75–0.85, p < .001), 0.76 (95% CI 0.70–0.81, p < .001), 0.76 (95% CI 0.70–0.81, p < .001) and 0.72 (95% CI 0.63–0.81, p < .001), respectively. Conclusions Increased serum NLRP3 along with its effector molecules in pregnant women with hyperglycemia are associated with the levels of insulin resistance and the subsequent development of adverse pregnancy outcomes.