We identified hibifolin as a sortase A (SrtA) inhibitor by screening the natural compounds library, which effectively inhibited the activity of SrtA with an IC 50 value of 31.20 μg/mL. Hibifolin attenuated the pathogenic behavior of Staphylococcus aureus , including adhesion, invasion, and biofilm formation.