To estimate genetically predicted causal associations of general and central obesity with GDM, and to determine the mediating role of circulating lipids.Summary-level data was obtained from the largest available genome-wide association studies of five obesity traits, five lipid traits and GDM. Two-sample univariate Mendelian randomization (MR), multivariate MR, and MR-based mediation analysis was applied to determine the total effect, direct effect and the mediating effect, respectively.Univariate MR showed that the odds of GDM increased per 1-SD increase in body mass index (BMI) (OR = 1.64, P = 5.05 × 10-17), waist-to-hip ratio (WHR) (OR = 1.57, P = 2.27 × 10-14) and WHR adjusted for BMI (OR = 1.42, P = 6.11 × 10-15). The heterogeneous associations of waist circumference (OR = 1.64, P = 5.57 × 10-14) and hip circumference (OR = 1.20, P = 0.002) on GDM further reflected that body fat distribution could influence GDM risk. Mediation analysis suggested that triglycerides, high-density lipoprotein-cholesterol and apolipoprotein A-I each mediated between 5% and 10% of the association between obesity and GDM.Our findings supported a deleterious causal effect of obesity on GDM risk, where lipid metabolism acted as potential drivers of the relationships between both general and central obesity and GDM.