Breast milk leptin plays a potential role in preventing childhood obesity. However, the associations of breast milk leptin with maternal metabolism in pregnancy and dietary patterns during lactation are still unclear. We aimed to explore associations of breast milk leptin with maternal metabolic profiles in pregnancy and dietary patterns during lactation. A total of 332 participants were recruited for this retrospective cohort study. Breast milk samples were collected at approximately 6 weeks postpartum. Breast milk leptin and twenty-three metabolic profiles in pregnancy were measured in this study. A semi-quantitative FFQ was used to gather dietary information during lactation. Both principal component analysis and the diet balance index were used to derive dietary patterns. Among twenty-three maternal metabolic profiles, maternal serum glucose (β = 1·61, P = 0·009), γ-glutamyl transferase (β = 0·32, P = 0·047) and albumin (β = −2·96, P = 0·044) in pregnancy were correlated with breast milk leptin. All dietary patterns were associated with breast milk leptin. Given the joint effects of maternal metabolism in pregnancy and dietary patterns during lactation, only diet quality distance was significantly associated with leptin concentrations in breast milk (low level v. almost no diet problem: β = −0·46, P = 0·011; moderate/high level v. almost no diet problem: β = −0·43, P = 0·035). In conclusion, both maternal metabolism in pregnancy and dietary patterns during lactation were associated with breast milk leptin. Maternal diet balance during lactation was helpful to improve breast milk leptin concentration.