Currently, dairy mastitis caused by Staphylococcus xylosus poses a serious challenge for dairy farming. In this study, we explored the role and mechanism of rhein against S. xylosus with the hope of providing new research ideas to solve mastitis in dairy cows and ensure the source safety of dairy products. Through in vitro antimicrobial studies, we found that the minimum inhibitory concentration (MIC) of rhein was 64 μg/mL, and it significantly interfered with the formation of S. xylosus biofilm at sub-MIC. In experiments on mastitis in mice, rhein alleviated inflammation in mammary tissue, reduced the levels of TNF-α and IL-6, and decreased the number of S. xylosus. To explore the anti-S. xylosus mechanism of rhein, we identified the relevant proteins involved in carbon metabolism (Glycolysis/gluconeogenesis, TCA cycle, Fatty acid degradation) through proteomics. Additionally, proteins associated with the respiratory chain, oxidative stress (proteins of antioxidant and DNA repair), and nitrate respiration were also found to be upregulated. Thus, rhein may act as an antibacterial agent by interfering with the respiratory metabolism of S. xylosus and inducing the production of ROS, high levels of which alter the permeability of bacterial cell membranes and cause damage to them. We measured the concentrations of extracellular β-galactosidase and nucleic acids. Additionally, SEM observation of S. xylosus morphology showed elevated membrane permeability and damage to the cell membrane. Finally, RT-PCR experiments showed that mRNAs of key proteins of the TCA cycle (odhA, mqo) and nitrate respiration (nreB, nreC, narG) were significantly up-regulated, consistent with proteomic results. In conclusion, rhein has good anti-S. xylosus effects in vitro and in vivo, by interfering with bacterial energy metabolism, inducing ROS production, and causing cell membrane and DNA damage, which may be one of the important mechanisms of its antimicrobial activity.