The study aimed to investigate the inhibitory activities of Litsea cubeba essential oil (LC-EO) on Aspergillus flavus and aflatoxin B1 production in licorice. The main chemical compositions of LC-EO, analyzed by gas chromatography–mass spectrometry (GC–MS), were (Z)-Limonene oxide (30.14%), (E)-Limonene oxide (27.92%) and D-Limonene (11.86%). The “ in vitro ” antifungal and antiaflatoxigenic properties of LC-EO were evaluated upon A. flavus. The headspace volatile assay showed more effective inhibition against A. flavus mycelial growth than contact assay with tested different concentrations of LC-EO. The minimum inhibitory concentration (MIC) and minimum fungicidal concentration (MFC) of LC-EO were 0.5 and 1.0μL/mL with fumigation, respectively. The EO exhibited a high toxicity against three toxigenic isolates of A. flavus. Morphological investigation performed by the scanning electron microscopy (SEM) showed that the hyphae and conidiophores structures underwent alterations, following the treated with LC-EO. The fumigated hyphae grow abnormally, were introcession, enation and wilting of the cell surface, featuring the flat strip shape. Meanwhile, in view of the antifungal and antiaflatoxigenic activities, LC-EO was also assessed the inhibitory effect of AFB1 production “ in situ ” investigation on Chinese herbal medicines (CHMs) system by volatile assay. The results showed that LC-EO could strongly inhibit the accumulation of aflatoxin B1 in licorice after being inoculated and incubated with A. flavus for 20 days. Thus, LC-EO can potentially be used as a highly efficient and eco-friendly antifungal fumigant to control post-harvest fungi and AFB1 production in licorice in the storage process.