Dispersion cancellation effects have attracted much attention in both classical and quantum worlds. In this paper, we show that by implementing a delicate design in a Mach–Zehnder (MZ) interferometer, we can observe the cancellation of even- and odd-order dispersion by twisting the polarizers placed in front of two single-photon detectors. This polarization post-selection scheme demonstrates that the classical and quantum interferogram can be obtained in different cases in a single MZ interferometer.