Background: Women with gestational diabetes mellitus (GDM) have elevated risk of type 2 diabetes mellitus (T2DM). Several studies have indicated healthy lifestyle reduces the prevalence of GDM. However, limited evidence shows the association between Mediterranean diet (MD) and GDM incidence in China. The aim of the current study was to establish a Chinese-habit-based MD recipe and investigate the effects of the modified MD on GDM. This trial recruited gestational age women who were planning a pregnancy in the near future with at least one risk factor for GDM. Methods: These participants were randomly assigned into the MD group and control group. They were required to follow diet interventions at least 6 months prior to pregnancy until delivery. Average dietary intake, glucose and insulin metabolism in 26-28-week of gestation, maternal and neonatal outcomes in each group were analyzed to assess the effects of MD. We analyzed the clinical outcomes of 580 participants, 294 in the MD group and 286 in the control group. Results: The MD group had a high intake of protein, vitamins, and dietary fibers, whereas low intake of fat, resulting in improved insulin and glucose metabolism. Meanwhile, women and their newborns in the MD group showed a reduced proportion of complications. Conclusion: The modified MD intervention started before pregnancy shows a preventive effect on GDM, also benefits the mother and their newborns in other outcomes.