Detection of explosives is an emerging task for maintaining civil security. Optical methods and especially tunable diode laser spectroscopy are discussed as means for providing fast and reliable data. Selective and sensitive detection is possible in the midinfrared spectral region; however, until recently, small and easy to operate laser sources were not readily available for applications outside the laboratory. The situation changes with the maturation of quantum cascade lasers (QCLs). We present detection methods based on photofragmentation and subsequent midinfrared detection of the fragments for the detection of nitrogen-based explosives. For this type of explosive, the very low vapor pressure makes the use of direct spectroscopic techniques extremely difficult, since the equilibrium concentrations are in the ppb to ppt range. Peroxide-based explosives like triacetone triperoxide possess a much higher vapor pressure, making direct absorption spectroscopy and also a quartz-enhanced photoacoustic spectroscopy sensor possible. The progress and challenges of the application of QCLs, also with respect to interferences with other molecules present, are discussed.