In this study, we propose a surface-enhanced Raman spectroscopy (SERS)-based method for the quantification of nitrite (NO2-) derived from the alkaline hydrolysis of explosive materials, octahydro-1,3,5,7- tetranitro-1,3,5,7-tetrazocine (HMX) and hexahydro-1,3,5-trinitro-1,3,5-triazine (RDX). For this purpose, samples were hydrolyzed and neutralized before SERS measurement. The SERS determination of nitrite was performed on the surface of 4-aminothiol-modified gold nanorods doped with silver nanoparticles. Due to the differential hydrolysis behaviour of HMX and RDX at different alkalinities and temperatures, these two nitramines could be separately determined with SERS. Calibration curves were obtained for HMX and RDX by plotting the maximum intensity band at 1286 cm (1) (arising from diazotization of nitrite) versus the concentration of standard solutions. This correlation was found to be linear within the concentration range of 0.25-10 mg L--1,L- and the limit of detection of the method was 0.39 mg L-1 and 0.61 mg L-1 for RDX and HMX, respectively. Both sensitivity and linearity were better than in similar SERS assays. The proposed SERS method was validated against UV-vis colorimetric method, and the effectiveness of the method to quantify HMX and RDX in real soil samples was investigated. This is the first study on the simultaneous quantification of HMX and RDX in synthetic solutions and real samples by SERS. It may also serve to quantify HMX, emerging as a major impurity in commercial grade RDX samples.