Fresh in-hull pistachio is one of the highly consumed but perishable forms of pistachio and can still be contaminated by aflatoxin-producing fungi. In this study, the packaging film prepared from an electrospun nanofibers was evaluated in order to increase the shelf life of raw pistachios. For this purpose, PVC and zinc nanoparticles combined with pistachio green hull essential oil (PGHEO) were used as the matrix and reinforcing phase of the composite, respectively. According to the results, monoterpenes such as α-pinene and limonene constitute more than 90% of PGHEO. The minimum inhibitory concentration (MIC) values of the essential oil ranged from 62.5 to 500 μg/mL which were more effective against Aspergillus flavus, a mycotoxigenic fungus affecting pistachio safety and quality, than other studied fungi. According to FE-SEM images, fibers were formed on film surfaces with diameters ranging from 89 nm to 295 nm. EDX spectra revealed some characteristic peaks for zinc indicating the existence of ZnO nanoparticles on the top surface of the composite. The prepared nanocomposite indicated the antifungal activity against Candida albicans, Aspergillus flavus and Aspergillus parasiticus with the growth inhibition percentage approximately 16.20, 9.60 and 2.88%, respectively. Finally, raw pistachios could be stored for 60 days in packaging made of nanocomposite, so that the amounts of aflatoxin B1 and B2 were lower than the allowed maximum level (< 12 ppb). It seems that the packaging used in this study can be a suitable solution to increase the shelf life of raw pistachios and reduce the waste caused by its spoilage.