Objective To investigate the perioperative treatment of gestational diabetes mellitus(GDM).Methods A total of 96 patients with gestational diabetes mellitus admitted to Xiamen Maternal and Child Health Hospital from April 2023 to April 2024 were selected as the research objects.They were divided into two groups according to differ-ent treatment methods,with 48 cases in each group.The control group was treated with protamine human insulin injec-tion,and the observation group was treated with insulin detemir injection.The blood glucose level,islet function and neonatal Apgar score were compared between the two groups.Results After treatment,the levels of fasting blood glu-cose,2-hour postprandial blood glucose and homeostatic model assessment of insulin resistance in the observation group were lower than those in the control group,and the homeostatic model assessment of islet β cell function index was higher than that in the control group,the differences were statistically significant(all P<0.05).The Apgar score of newborns in the observation group was higher than that in the control group,and the difference was statistically signifi-cant(P<0.05).Conclusion Insulin detemir injection has a significant effect on patients with GDM,which can effec-tively regulate blood glucose levels and islet function,and improve the health status of newborns.