AimsTo explore associations between ceramides in early pregnancy and gestational diabetes mellitus (GDM); and interactions between ceramides and trimethylamine N-oxide (TMAO) metabolites for GDM. MethodsWe organized a 1:1 nested case-control study (n = 486) from a prospective cohort of pregnant women. Conditional logistic regression and additive interaction were performed to examine relationships between ceramides and TMAO metabolites for GDM. We defined trimethylamine (TMA) conversion ratio (TMAR) as TMA/its precursors and TMAO conversion ratio (TMAOR) as TMAO/TMA. Copresence of high TMAR and low TMAOR indicated TMA accumulation status. ResultsHigh ceramides 18:0 (per SD), 18:1 (per SD) and low ceramide 24:0 (≤ 3.60 nmol/mL) were associated with increased GDM risk (OR: 1.69, 1.72 & 3.59, respectively). High TMA enhanced the OR of low ceramide 24:0 for GDM from 1.53 (95%CI: 0.88–2.66) to 10.3 (2.83–37.5), high TMAR enhanced it from 1.31 (0.67–2.56) to 24.3 (6.57–89.5) and TMA accumulation enhanced it from 1.42 (0.72–2.77) to 25.5 (6.80–95.7), with all additive interactions being significant. However, the interactions between high ceramide 18 and TMAO metabolites were not significant. ConclusionsHigh ceramides 18:0, 18:1 and low ceramide 24:0 in early pregnancy were associated with increased GDM risk. Notably, TMA accumulation greatly amplified the risk-promoting effect of low ceramide 24:0 for GDM.