This study evaluated the inhibitory effects of essential oil extracted from Myristica fragrans Houtt (nutmeg) by hydrodistillation on mycelial growth, sporulation, and aflatoxin B1 production of Aspergillus flavus IMI 242684 and Aspergillus parasiticus IMI 283883 by fumigant and contact application. Gas chromatography-mass spectrometry analysis of M. fragrans essential oil showed that safrole (42.50%) was the major component, followed by 4-terpineol (23.81%) and methyl eugenol (11.14%). At an essential oil concentration of 1000 ppm, the mycelial growth of both Aspergillus strains was significant completely inhibited by vapor treatment but only reduced by about 70% by contact treatment. By contrast, sporulation and aflatoxin B1 production were completely inhibited by both contact and vapor treatment. Vapor treatment induced a higher level of inhibition than contact treatment. In conclusion, nutmeg essential oil is a potential chemical agent and can help to prevent infestation of stored foods and feeds.