ImportanceMaternal diabetes and overweight or obesity are known to be associated with increased risk of congenital heart defects (CHDs) in offspring, but there are no large studies analyzing outcomes associated with these factors in 1 model.ObjectiveTo investigate the association of maternal diabetes and overweight or obesity with CHDs among offspring in 1 model.Design, Setting, and ParticipantsThis nationwide, population-based register study was conducted in a birth cohort from Finland consisting of all children born between 2006 and 2016 (620 751 individuals) and their mothers. Data were analyzed from January 2022 until November 2023.ExposuresMaternal prepregnancy body mass index (BMI; calculated as weight in kilograms divided by height in meters squared), categorized as underweight (<18.5), normal (18.5-24.9), overweight (25.0-29.9), and obesity (≥30), was assessed. Maternal diabetes status, classified as no diabetes, type 1 diabetes (T1D), type 2 or other diabetes, and gestational diabetes, was assessed.Main Outcomes and MeasuresOdds ratios (ORs) of isolated CHDs in children were found. In addition, 9 anatomical CHD subgroups were studied.ResultsOf 620 751 children (316 802 males [51.0%]; 573 259 mothers aged 20-40 years [92.3%]) born in Finland during the study period, 10 254 children (1.7%) had an isolated CHD. Maternal T1D was associated with increased odds of having a child with any CHD (OR, 3.77 [95% CI, 3.26-4.36]) and 6 of 9 CHD subgroups (OR range, 3.28 [95% CI, 1.55-6.95] for other septal defects to 7.39 [95% CI, 3.00-18.21] for transposition of great arteries) compared with no maternal diabetes. Maternal overweight was associated with left ventricular outflow tract obstruction (OR, 1.28 [95% CI, 1.10-1.49]) and ventricular septal defects (OR, 0.92 [95% CI, 0.86-0.98]), and obesity was associated with complex defects (OR, 2.70 [95% CI, 1.14-6.43]) and right outflow tract obstruction (OR, 1.31 [95% CI, 1.09-1.58]) compared with normal maternal BMI.Conclusions and RelevanceThis study found that maternal T1D was associated with increased risk for most types of CHD in offspring, while obesity and overweight were associated with increased risk for complex defects and outflow tract obstruction and decreased risk for ventricular septal defects. These different risk profiles of T1D and overweight and obesity may suggest distinct underlying teratogenic mechanisms.