Twenty-seven rosmarinic acid derivatives were synthesized, among which compound RA-N8 exhibited the most potent antibacterial ability. The minimum inhibition concentration of RA-N8 against both S. aureus (ATCC 29213) and MRSA (ATCC BAA41 and ATCC 43300) was found to be 6 μg/mL, and RA-N8 killed E. coli (ATCC 25922) at 3 μg/mL in the presence of polymyxin B nonapeptide (PMBN) which increased the permeability of E. coli. RA-N8 exhibited a weak hemolytic effect at the minimum inhibitory concentration. SYTOX Green assay, SEM, and LIVE/DEAD fluorescence staining assay proved that the mode of action of RA-N8 is targeting bacterial cell membranes. Furthermore, no resistance in wildtype S. aureus developed after incubation with RA-N8 for 20 passages. Cytotoxicity studies further demonstrated that RA-N8 is non-toxic to the human normal cell line (HFF1). RA-N8 also exerted potent inhibitory ability against biofilm formation of S. aureus and even collapsed the shaped biofilm.