Background and aims: Mastitis is one of the main complications during breastfeeding and contributes to the cessation of breastfeeding. However, the etiopathogenesis and diagnosis of mastitis are complex and not yet well defined. We aimed to identify metabolic and lipidic changes in human milk during acute and subacute mastitis in order to detect potential biomarkers of mastitis. Methods: We conducted a pilot case-control study including 14 breastfeeding women with acute mastitis, 32 with subacute mastitis symptoms, and 19 without any mastitis symptoms (control). Milk samples were collected and analyzed by proton nuclear magnetic resonance (H-NMR) for metabolomics analysis. To assess the association between the significant metabolites and lipids and the development of acute and subacute mastitis, multi-adjusted logistic regression models were developed. Results: The NMR-based metabolomics approach was able to identify and quantify a total of 40 metabolites in breast milk samples. After adjusting for confounding variables, acute mastitis was significantly associated with acetate (OR 3.9 IC 1.4-10.8), total cholesterol (OR 14 CI 3.2-62), esterified cholesterol (OR 3.3 CI 1.9-5.8), and sphingomyelin (OR 2.6 CI 1.2-5.8). The other metabolites presented weak association (OR < 2.5). Subacute mastitis was significantly associated with glutamine, lysophosphatidylcholine, phosphatidylcholine, plasmalogen, and total polyunsaturated fatty acids, but only cholesterol showed a strong association (OR > 2.5) with an OR of 2.6 (IC 1.1-6.6). Conclusions: Metabolic alteration in breast milk occurs during a process of both acute and subacute mastitis. Acetate, esterified cholesterol, lysophostidylcholine, and polyunsaturated fatty acids increased in both acute and subacute mastitis. However, according to the multi-adjusted regression logistic models, the candidate biomarkers for acute and subacute mastitis are cholesterol, lysophosphatidylcoholine, phosphatidylcholine, plasmalogen, and polyunsaturated fatty acids.