In this research, a chemiresistor sensor coated with the polyvinyl alcohol/polypyrrole/molecularly imprinted polymer (PVA/PPy/MIP) nanocomposite was designed and fabricated to detect the vapor of 2,4‐DNT as a nitroaromatic explosive material. The molecularly imprinted polymer was composed of molecular nanoparticles containing cavities compatible with DNT; while, the nanoparticles were synthesized using PVA and glutaraldehyde as functionalized polymer and cross‐linking agent, respectively. Composition and chemical properties of the synthesized MIP and PPy nanoparticles were investigated using scanning electron microscopy (SEM), infrared Fourier transform spectroscopy (ATR‐FTIR), and X‐ray diffraction (XRD) analyses. Results indicated that the nanoparticles of polypyrrole and the synthesized MIP have an average particle sizes of 56 nm and 45 nm, respectively. Afterwards, sensor surface was coated by a thin layer of nanocomposite composed of PVA, the PPy and MIP nanoparticles. The prepared sensors were calibrated and performance‐tested in a static setup. The developed sensor was used to measure different concentrations (0.1–150 ppm) of the explosive vapor. The coated sensor presented a linear range of response within the concentration range of 0.1–70 ppm. Also, selectivity tests were carried out in the presence of DNT and vapor of other organic matters and the results indicated that the designed sensor possesses high sensitivity and selectivity toward DNT.