Antibiotic resistance is a critical problem that results in a high morbidity and mortality rate. The process of discovering new chemotherapy and antibiotics is challenging, expensive, and time-consuming, with only a few getting approved for clinical use. Therefore, screening already-approved drugs to combat pathogens such as bacteria that cause serious infections in humans and animals is highly encouraged. In this work, we aim to identify approved antibiotics that can inhibit the mecA antibiotic resistance gene found in methicillin-resistant Staphylococcus aureus (MRSA) strains. The MecA protein sequence was utilized to perform a BLAST search against a drug database containing 4302 approved drugs. The results revealed that 50 medications, including known antibiotics for other bacterial strains, targeted the mecA antibiotic resistance gene. In addition, a structural similarity approach was employed to identify existing antibiotics for S. aureus, followed by molecular docking. The results of the docking experiment indicated that six drugs had a high binding affinity to the mecA antibiotic resistance gene. Furthermore, using the structural similarity strategy, it was discovered that afamelanotide, an approved drug with unclear antibiotic activity, had a strong binding affinity to the MRSA-MecA protein. These findings suggest that certain already-approved drugs have potential in chemotherapy against drug-resistant pathogenic bacteria, such as MRSA.