Objective To investigate the effect of treating gestational diabetes mellitus with insulin aspart and insulin detemir.Methods A total of 200 patients with gestational diabetes mellitus admitted to Anxi County Hospital from April 2022 to February 2024 were selected as the study subjects.The patients were randomly divided into control group and observation group by random number table method,with 100 cases in each group.The patients in the con-trol group were treated with insulin aspart alone,and the patients in the observation group were treated with insulin de-temir on the basis of the control group.After treatment,the therapeutic effects of the two groups were compared and analyzed.Results The fasting blood glucose compliance maintaining time(7.64±1.42)h and postprandial 2 h blood glucose compliance maintaning time(8.97±1.42)h in the observation group were longer than those in the control group(5.56±1.33)h and(5.67±1.33)h,the overall insulin dose in the observation group(25.18±4.74)U was less than that in the control group(36.52±4.81)U,and the differences were statistically significant(all P<0.05).After treatment,the levels of fasting blood glucose and 2 h postprandial blood glucose in the two groups decreased,and the observation group were significantly lower than those in the control group,and the differences were statistically significant(both P<0.05).The incidence of complications in the observation group was 7.00%,which was lower than 19.00%in the con-trol group,and the difference was statistically significant(P<0.05).Conclusion Insulin aspart combined with insulin detemir has a better control effect on patients with gestational diabetes mellitus,lowering blood glucose without elevat-ing the incidence of adverse reactions.