Aims/hypothesisThe aim of this study was to determine the long-term cost-effectiveness and return on investment of implementing a structured lifestyle intervention to reduce excessive gestational weight gain and associated incidence of gestational diabetes mellitus (GDM) and type 2 diabetes mellitus.MethodsA decision-analytic Markov model was used to compare the health and cost-effectiveness outcomes for (1) a structured lifestyle intervention during pregnancy to prevent GDM and subsequent type 2 diabetes; and (2) current usual antenatal care. Life table modelling was used to capture type 2 diabetes morbidity, mortality and quality-adjusted life years over a lifetime horizon for all women giving birth in Australia. Costs incorporated both healthcare and societal perspectives. The intervention effect was derived from published meta-analyses. Deterministic and probabilistic sensitivity analyses were used to capture the impact of uncertainty in the model.ResultsThe model projected a 10% reduction in the number of women subsequently diagnosed with type 2 diabetes through implementation of the lifestyle intervention compared with current usual care. The total net incremental cost of intervention was approximately AU$70 million, and the cost savings from the reduction in costs of antenatal care for GDM, birth complications and type 2 diabetes management were approximately AU$85 million. The intervention was dominant (cost-saving) compared with usual care from a healthcare perspective, and returned AU$1.22 (95% CI 0.53, 2.13) per dollar invested. The results were robust to sensitivity analysis, and remained cost-saving or highly cost-effective in each of the scenarios explored.Conclusions/interpretationThis study demonstrates significant cost savings from implementation of a structured lifestyle intervention during pregnancy, due to a reduction in adverse health outcomes for women during both the perinatal period and over their lifetime.Graphical abstractSupplementary InformationThe online version contains peer-reviewed but unedited supplementary material available at 10.1007/s00125-023-05897-5.