Aureobasidium melanogenum was found to be grown the best at the constant pH 7.0 and to produce the highest amount of liamocins at the constant pH 3.0. Therefore, the wild type strain A. melanogenum 9‐1 and the engineered strain V33 constructed in the laboratory were grown at the constant pH 7.0 for 48 h, then, they were continued to be cultivated at the constant pH 3.0. Under such conditions, A. melanogenum 9‐1 produced 36.51 ± 0.55 g L−1 of liamocin and its cell mass was 27.43 ± 0.63 and 6.00 ± 0.11 g L−1 of glucose was left in the finished medium within 168 h while the engineered strain V33 secreted 70.86 ± 2.04 g L−1 of liamocin, its cell mass was 31.63 ± 0.74 g L−1, 0.16 ± 0.01 g L−1 of glucose was maintained in the finished medium. Then, Massoia lactone was released from the produced liamocins. The released Massoia lactone loaded in the nanoemulsions could be used to actively damage cell wall and cell membrane of both spores and mycelia of Aspergillus flavus, leading to its cell necrosis. Massoia lactone loaded in the nanoemulsions also actively inhibited cell growth of A. flavus, its conidia production and aflatoxin biosynthesis on peanuts, indicating that Massoia lactone loaded in the nanoemulsions had highly potential application in controlling cell growth of A. flavus and aflatoxin biosynthesis in foods and feedstuffs.