The inhibitory effect of erianin on Staphylococcus aureus was determinated via the micro–broth dilution method. The fluorescence resonance energy transfer assay and the molecular docking technique were used to determine the inhibitory action and molecular mechanism of erianin on S. aureus SrtA. Mouse peritonitis model was constructed to observe the therapeutic effect of erianin against S. aureus infection. The results showed that the minimum inhibitory concentration (MIC) of erianin against S. aureus in vitro was 512 μg/mL, and the minimum bactericidal concentration (MBC)erianin against S. aureus was more than 1 024 μg/mL. Erianin could significantly inhibit SrtA activity with an IC50 value of (20.91±2.31) μg/mL. The erianin tightly bound to SrtA at the active center and resulted in a stable complex, which changed the biological activity of the SrtA. Erianin could relieve infection caused by S. aureus and reduce the formation of abscess in mice.