In this study, a rapid, sensitive, and fully automated on-line solid phase extraction (SPE)-liquid chromatography (LC)-mass spectrometry (MS) method for the analysis of explosive residues in water, was systematically investigated. First, separation of explosive residues was achieved by reverse-phase chromatography using an XDB-C18 column in 30 min with an eluent containing 0.1% acetic acid, 5 mM ammonium acetate, and methanol. Secondly, atmospheric pressures chemical ionization (APCI) and electrospray ionization (ESI) interfaced with the MS detector were used to examine the explosive residues, indicating that APCI-MS was more suitable than ESI-MS for the detection of explosives. Thirdly, the conditions for on-line SPE, including solvent pH and sample injected volume, were optimized. The calibration curves obtained for all explosives studied were linear in the concentration range 0.5-50 lg L -1 . The detection limits of this method ranged from 0.05 to 0.5 lg L -1 when 4000 lL of sample was on-line pre-concentrated on C18 enrichment column. The recoveries from lake waters spiked with explosive standard solution ranged from 90.5 to 108.0%. The proposed method is simple, fast, and could be applied successfully to the analysis of explosive residues in contaminated water without any further pretreatment.