The aim of this study was to evaluate the chemical compounds of garlic essential oil (EO), and determine the antifungal efficacy of garlic EO and its major components, diallyl trisulfide and its nanoemulsions against wood-rotting fungi, Trametes hirsuta and Laetiporus sulphureus. GC-MS analysis revealed that the major constituents of garlic EO were diallyl trisulfide (39.79%), diallyl disulfide (32.91%), and diallyl sulfide (7.02%). In antifungal activity, the IC50 value of garlic EO against T. hirsuta and L. sulphureus were 137.3 and 44.6 μg/mL, respectively. Results from the antifungal tests demonstrated that the three major constituents were shown to have good antifungal activity, in which, diallyl trisulfide was the most effective against T. hirsuta and L. sulphureus, with the IC50 values of 56.1 and 31.6 μg/mL, respectively. The diallyl trisulfide nanoemulsions showed high antifungal efficacy against the examined wood-rotting fungi, and as the amount of diallyl trisulfide in the lipid phase increases, the antifungal efficacy of the nanoemulsions increases. These results showed that the nanoemulsions and normal emulsion of diallyl trisulfide have potential to develop into a natural wood preservative.