Cordia elaeagnoides A. DC. is an endemic species of Mexico valued for its timber. Renowned for its durability, resistance, and versatile applications in medicine, this tree holds significant commercial importance. Tetrahydrofuran (THF) extract from the heartwood of C. elaeagnoides was studied. Through chromatographic column purification, the compound 8-(2,5-Dihydroxyphenyl)-2,6-dimethylocta-2,6-dienal, also known as alliodorin, was successfully isolated. Identification of alliodorin was confirmed through comprehensive analysis utilizing NMR, IR, and mass spectrometry techniques. Inhibition tests were conducted using both the THF extract and alliodorin against the rotting fungus Trametes versicolor (L.) Lloyd, employing the agar well diffusion assay. Remarkably, alliodorin exhibited 100% inhibition with a median lethal concentration of 0.079 mg/mL and a total lethal concentration of 0.127 mg/mL, in comparison to the commercial fungicide benomyl, which requires a concentration of 1 mg/mL. In silico analysis through molecular docking on the laccase enzyme was proposed in order to explain the inhibitory activity against the fungus T. versicolor, as this enzyme is one of the main sources of nutrients and development for the fungus. Based on these findings, we deduced that alliodorin holds promise as a potent antifungal agent, potentially applicable in a wide array of technological and environmentally friendly initiatives.