Fungal growth, particularly from species like Aspergillus, poses significant economic, agricultural, and health risks to humans due to aflatoxin production. Consequently, inhibiting aflatoxin synthesis has become a critical objective. In this study, researchers targeted the thioesterase (TE) domain of the Polyketide synthase enzyme for in silico docking experiments using AutoDock Vina. The aim was to identify potential inhibitors that could selectively target the TE domain. Various fatty acids from Lignosus rhinocerus were employed for this purpose, including lauric acid, decanoic acid, tetradecanoic acid-methyl ester, hexadecanoic acid, propionic acid, palmitic acid, stearic acid, and oleic acid. Decanoic acid showed promising results with binding energy close to the standard, forming two conventional hydrogen bonds, and exhibiting hydrophobic interactions during docking with the 3ILS protein. These findings suggest that decanoic acid could be utilized for inhibiting and controlling aflatoxin contamination in agricultural crops.