To estimate the effects of exercise during the first trimester on the risks of abnormal screening and gestational diabetes mellitus (GDM). Data come from PETALS, a prospectively followed pregnancy cohort (n = 2,246, 79% minorities) receiving care at Kaiser Permanente Northern California. A Pregnancy Physical Activity Questionnaire was used to assess exercise. Glucose testing results for screening and diagnostic tests were obtained from electronic health records. Inverse probability of treatment weighting and targeted maximum likelihood with data-adaptive estimation (machine learning) of propensity scores and outcome regressions were used to obtain causal risk differences adjusted for potential confounders, including prepregnancy BMI, exercise before pregnancy, and gestational weight gain. Exercise was dichotomized at 1) the cohort’s 75th percentile for moderate- to vigorous-intensity exercise (≥13.2 MET-h per week or ≥264 min per week of moderate exercise), 2) current recommendations (≥7.5 MET-h per week or ≥150 min per week of moderate exercise), and 3) any vigorous exercise. Overall, 24.3% and 6.5% had abnormal screening and GDM, respectively. Exercise meeting or exceeding the 75th percentile decreased the risks of abnormal screening and GDM by 4.8 (95% CI 1.1, 8.5) and 2.1 (0.2, 4.1) fewer cases per 100, respectively, in adjusted analyses. Exercise reduces the risks of abnormal screening and GDM, but the amount needed to achieve these risk reductions is likely higher than current recommendations. Future interventions may consider promoting ≥38 min per day of moderate-intensity exercise to prevent GDM.