Continuous glucose monitoring has facilitated the evaluation of dynamic changes in glucose throughout the day and their effect on fetal growth abnormalities in pregnancy. However, studies of multiple continuous glucose monitoring metrics combined and their association with other adverse pregnancy outcomes are limited. This study aimed to (1) use machine learning techniques to identify discrete glucose profiles based on weekly continuous glucose monitoring metrics in pregnant individuals with pregestational diabetes mellitus and (2) investigate their association with adverse pregnancy outcomes. This study analyzed data from a retrospective cohort study of pregnant patients with type 1 or 2 diabetes mellitus who used Dexcom G6 continuous glucose monitoring and delivered a nonanomalous, singleton pregnancy at a tertiary center between 2019 and 2023. Continuous glucose monitoring data were collapsed into 39 weekly glycemic measures related to centrality, spread, excursions, and circadian cycle patterns. Principal component analysis and k-means clustering were used to identify 4 discrete groups, and patients were assigned to the group that best represented their continuous glucose monitoring patterns during pregnancy. Finally, the association between glucose profile groups and outcomes (preterm birth, cesarean delivery, preeclampsia, large-for-gestational-age neonate, neonatal hypoglycemia, and neonatal intensive care unit admission) was estimated using multivariate logistic regression adjusted for diabetes mellitus type, maternal age, insurance, continuous glucose monitoring use before pregnancy, and parity. Of 177 included patients, 90 (50.8%) had type 1 diabetes mellitus, and 85 (48.3%) had type 2 diabetes mellitus. This study identified 4 glucose profiles: (1) well controlled; (2) suboptimally controlled with high variability, fasting hypoglycemia, and daytime hyperglycemia; (3) suboptimally controlled with minimal circadian variation; and (4) poorly controlled with peak hyperglycemia overnight. Compared with the well-controlled profile, the suboptimally controlled profile with high variability had higher odds of a large-for-gestational-age neonate (adjusted odds ratio, 3.34; 95% confidence interval, 1.15-9.89). The suboptimally controlled with minimal circadian variation profile had higher odds of preterm birth (adjusted odds ratio, 2.59; 95% confidence interval, 1.10-6.24), cesarean delivery (adjusted odds ratio, 2.76; 95% confidence interval, 1.09-7.46), and neonatal intensive care unit admission (adjusted odds ratio, 4.08; 95% confidence interval, 1.58-11.40). The poorly controlled profile with peak hyperglycemia overnight had higher odds of preeclampsia (adjusted odds ratio, 2.54; 95% confidence interval, 1.02-6.52), large-for-gestational-age neonate (adjusted odds ratio, 3.72; 95% confidence interval, 1.37-10.4), neonatal hypoglycemia (adjusted odds ratio, 3.53; 95% confidence interval, 1.37-9.71), and neonatal intensive care unit admission (adjusted odds ratio, 3.15; 95% confidence interval, 1.20-9.09). Discrete glucose profiles of pregnant individuals with pregestational diabetes mellitus were identified through joint consideration of multiple continuous glucose monitoring metrics. Prolonged exposure to maternal hyperglycemia may be associated with a higher risk of adverse pregnancy outcomes than suboptimal glycemic control characterized by high glucose variability and intermittent hyperglycemia.