This study utilised molecular docking to predict the binding affinity of various fatty acids (FAs) found in Swietenia humilis to the sortase A (SrtA) protein target from Staphylococcus aureus. Binding energies, measured in kcal/mol, indicated the strength and stability of ligand-protein interactions, with lower values signifying stronger binding. The binding affinities of eight FAs as the active constituents in n-hexane extract of S. humilis and the positive control, gentamicin, were compared to assess their theoretical antibacterial activity. Palmitoleic acid exhibited the strongest binding affinity (-5.6 kcal/mol) among the FAs, suggesting the highest potential antibacterial activity, followed by linoleic, palmitic, linolenic, arachidic, tricosanoic, stearic, and oleic acids in decreasing order of affinity. Despite having weaker binding energies than gentamicin, a common gram-positive inhibitor from aminoglycoside derivative, FAs showed multiple hydrogen bonds and van der Waals interactions with key residues like ARG197, VAL168, VAL166, and ILE182, contributing to their binding stability. Palmitoleic acid formed multiple hydrogen bonds (ARG197 and GLY119) and significant van der Waals interactions, highlighting its strong theoretical binding. Stearic and oleic acids, although having higher binding energies, also formed critical hydrogen bonds, suggesting moderate potential activity. Gentamicin's single hydrogen bond suggests a highly specific binding site, which may result in high antibacterial activity despite fewer interaction points. The study indicated that FAs like palmitoleic and oleic acid show substantial potential as supplementary antibacterial agents, especially in the context of combating antibiotic resistance. This finding can pave a path for drug design and development to address the S. aureus's resistance.