A Mach–Zehnder interferometer gas sensor, in which the photonic crystal fiber (PCF) is coated with an allyl tetraphenylethylene (AL-TPE) film, is proposed. By fusing single-mode fibers to both ends of a PCF coated with an AL-TPE film, a core-mismatch sensor for explosive trinitrotoluene (TNT) detection is formed. The relationship between the effective refractive index of the cladding mode and the refractive index of the sensitive film was simulated by the finite element method. The results indicate that as the refractive index of the sensitive film increases from 1.440 to 1.450, the interference fringes appear blue shift. The correlation coefficient is 0.998 and the sensitivity is 221 nm RIU−1. The experimental study investigated the interferometric spectra of PCF within the range of 10–40 mm interaction lengths. It was found that with longer interaction lengths, the trough shapes became sharper and wavelength shifts became more pronounced. In the case of a 30 mm interaction length PCF sensor, its linearity R
2 = 0.9804, with a sensitivity of 172.67 pm ppb−1 for TNT vapor. The sensor showed good selectivity when tested on non-explosive gases.