Here, we performed a comprehensive evaluation using non-targeted metabolomics, network pharmacology, and molecular-docking assays to delineate the underlying mechanisms and therapeutic targets of GYS in mastitis. This evidence concerns the gene GYS1 and mastitis.