We aimed to evaluate whether improving maternal diet during lactation in diet‐induced obese rats reverts the impact of western diet (WD) consumption on the metabolome of milk and offspring plasma, as well as to identify potential biomarkers of these conditions. Three groups of dams were followed: control‐dams (CON‐dams), fed with standard diet (SD); WD‐dams, fed with WD prior and during gestation and lactation; and reversion‐dams (REV‐dams), fed as WD‐dams but moved to SD during lactation. Metabolomic analysis was performed in milk at lactation days 5, 10, and 15, and in plasma from their male and female offspring at postnatal day 15. Milk of WD‐dams presented, throughout lactation and compared to CON‐dams, altered profiles of amino acids and of the carnitine pool, accompanied by changes in other polar metabolites, being stachydrine, N‐acetylornithine, and trimethylamine N‐oxide the most relevant and discriminatory metabolites between groups. The plasma metabolome profile was also altered in the offspring of WD‐dams in a sex‐dependent manner, and stachydrine, ergothioneine and the acylcarnitine C12:1 appeared as the top three most discriminating metabolites in both sexes. Metabolomic changes were largely normalized to control levels both in the milk of REV‐dams and in the plasma of their offspring. We have identified a set of polar metabolites in maternal milk and in the plasma of the offspring whose alterations may indicate maternal intake of an unbalanced diet during gestation and lactation. Levels of these metabolites may also reflect the beneficial effects of implementing a healthier diet during lactation.