In recent years, the issue of antimicrobial resistance has gained significant global attention. The prevalence of methicillin-resistant Staphylococcus aureus (MRSA) infection rates worldwide has seen a rapid rise, increasing from 1%-5% in the mid-1980s to 60%-70% at present. This alarming increase in MRSA infection poses a serious threat to public health globally. Consequently, it is crucial to explore and identify effective drug candidates for combating MRSA. We researched the antibacterial properties of Urtica dioica L. Modern techniques such as systematic solvent extraction, macroporous resin chromatography, and silica gel column chromatography were utilized to isolate and detect components of MRSA. The most potent antibacterial active components were screened using fungal staining (K-B staining) and 2,3,5-triphenyltetrazolium chloride staining (TTC staining). Based on pharmacological activity guidance, we isolated a total of nine compounds from this plant. They were vanillic acid (compound A), quercetin-3-O-glucopyranoside (compound B), ursolic acid (compound C), vanillin (compound D), salicyl alcohol (compound E), kaempferol (compound F), quercetin (compound G), quercetin-3-O-galactoside (compound H), and isorhamnetin (compound I). Isolated compounds A, D, and E have better anti-MRSA activity. It inhibits bacterial division and growth during the logarithmic growth period and acts as a bacterial inhibitor. Inhibition may be mediated by the disruption of the bacterial cell structure, leading to leakage of contents including sugars, nucleic acids, and proteins. It may also be mediated by regulating phosphorus metabolism and disrupting the bacterial cell membrane potential to affect cellular metabolism.