Background and aims: Low-carbohydrate diets (LCDs) are increasingly popular but may be nutritionally inadequate. We aimed to examine if carbohydrate restriction in midlife is associated with risk of developing type 2 diabetes (T2DM), and if this association differs by previous gestational diabetes (GDM) diagnosis. Methods and results: Dietary intake was assessed for 9689 women from the Australian Longitudinal Study on Women's Health in 2001 (aged 50–55) and 2013 (aged 62–67) via validated food frequency questionnaires. Average long-term carbohydrate restriction was assessed using a low-carbohydrate diet score (highest quartile (Q4) indicating lowest proportion of energy from carbohydrates). Incidence of T2DM between 2001 and 2016 was self-reported at 3-yearly surveys. Log-binomial regression was used to estimate relative risks (RR) and 95% CIs. During 15 years of follow-up, 959 women (9.9%) developed T2DM. Carbohydrate restriction was associated with T2DM after adjustment for sociodemographic factors, history of GDM diagnosis and physical activity (Q4 vs Q1: RR 1.27 [95% CI 1.10, 1.48]), and this was attenuated when additionally adjusted for BMI (1.10 [0.95, 1.27]). Carbohydrate restriction was associated with lower consumption of fruit, cereals and high-fibre bread, and lower intakes of these food groups were associated with higher T2DM risk. Associations did not differ by history of GDM (P for interaction >0.15). Conclusion: Carbohydrate restriction was associated with higher T2DM incidence in middle-aged women, regardless of GDM history. Health professionals should advise women to avoid LCDs that are low in fruit and grains, and to consume a diet in line with current dietary recommendations.