A facile strategy for optical sensing of explosives with the assistance of 1,3,5-Triazine-2,4,6-triamine (MEL) in aqueous solution is proposed. Upon exposure to MEL, the electron-sufficient amino group in MEL was prone to form complexes with electron-deficient nitro group in explosives. The interaction could be tuned by the amount of MEL to fully consumed nitro-contained explosives dissolved in wastewater, thus prevented the gold nanoparticles (GNPs) from combining with MEL. In comparison with common detection method, the dose-response curve procedure reported here was in good linear relationship from 0 mu M to 80 mu M with good correlation factor (R-2 = 0.9871), and was satisfactorily agreed with the proposed theoretical model. The detection limit (LoD) was 1.1 mu M by spectrometer, 3.0 mu M visualized by naked eyes and 21.3 nM by calculation. The procedure described in this study could be finished within a few minutes and showed its effectiveness in explosive detection upright on the gold surface in real wastewater, making this proposed method a powerful tool in several sensing platforms.