BackgroundAbnormal lipid metabolism is associated with gestational diabetes mellitus (GDM) in singleton pregnancies. Data were lacking on twin pregnancies with GDM. We explored the association between serum lipid profiles in the first and second trimesters as well as their dynamic changes and GDM in twin pregnancies.MethodsThis was a retrospective cohort study of 2739 twin pregnancies that underwent a 75-g oral glucose tolerance test (OGTT) and were selected from the Beijing Birth Cohort Study from June 2013 to May 2021. Cholesterol (CHO), triglyceride (TG), high-density lipoprotein (HDL) and low-density lipoprotein (LDL) levels were measured at mean 9 and 25 weeks of gestation. We described maternal lipid levels in different tertiles that were associated with the risk of GDM stratified for age, pre-BMI, and fertilization type. GDM patients were divided into two groups according to OGTT: elevated fasting plasma glucose only (FPG group) and the rest of the GDM (non-FPG group). We estimated the relative risk of GDM with multivariable logistic regression models.ResultsIn this study, we found that 599 (21.9%, 599/2739) twin pregnancies developed GDM. They had increased CHO, TG, LDL, and LDL/HDL, decreased HDL levels in the first trimester, and increased TG as well as decreased HDL in the second trimester in univariate analyses, each P < 0.05. In multivariate analysis, when TG > 1.67 mmol/l (upper tertile) in elderly individuals, nonoverweight and ART groups increased the risk of GDM by 2.7-fold, 2.3-fold and 2.2-fold, respectively, compared with TG < 0.96 mmol/l (lower tertile). This effect remained in the abovementioned groups in the second trimester. Moreover, high TGs increased the risk of GDM in the FPG group (OR = 2.076, 95% CI 1.130–3.815) and non-FPG group (OR = 2.526, 95% CI 1.739–3.67) in the first trimester when TG > 1.67 mmol/l, and the rising risk in the non-FPG group as the TG tertile increased remained in the second trimester. HDL predominantly showed a negative association with elevated FPG in the second trimester (p < 0.05).ConclusionsTwin pregnancies with GDM have higher lipid levels. Increased TGs in the first and second trimesters are strongly associated with GDM, especially in elderly individuals, nonoverweight and ART groups. Lipid profiles varied among different GDM subtypes.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13098-023-01095-w.