Weight gain in early pregnancy may influence a woman’s risk of developing preeclampsia. However, the consequences of weight gain throughout pregnancy up to the diagnosis of preeclampsia are unknown. The aim of this study was to determine whether pregnancy weight gain before the diagnosis of preeclampsia is associated with increased risks of preeclampsia (overall and by preeclampsia subtype). The study population included nulliparous pregnant women in the Swedish counties of Gotland and Stockholm, 2008 to 2013, stratified by early pregnancy body mass index category. Electronic medical records were linked with population inpatient and outpatient records to establish date of preeclampsia diagnosis (classified as any, early preterm <34 weeks, late preterm 34–36 weeks, or term ≥37 weeks). Antenatal weight gain measurements were standardized into gestational age-specific z scores. Among 62 705 nulliparous women, 2770 (4.4%) developed preeclampsia. Odds of preeclampsia increased by ≈60% with every 1 z score increase in pregnancy weight gain among normal weight and overweight women and by 20% among obese women. High pregnancy weight gain was more strongly associated with term preeclampsia than early preterm preeclampsia (eg, 64% versus 43% increased odds per 1 z score difference in weight gain in normal weight women, and 30% versus 0% in obese women, respectively). By 25 weeks, the weight gain of women who subsequently developed preeclampsia was significantly higher than women who did not (eg, 0.43 kg in normal weight women). In conclusion, high pregnancy weight gain before diagnosis increases the risk of preeclampsia in nulliparous women and is more strongly associated with later-onset preeclampsia than early-onset preeclampsia.