A simple and sensitive method has been developed using preconcentration technique solid phase microextraction (SPME) and analytical technique HPLC-UV for the determination of octahydro-1,3,5,7-tetranitro-1,3,5,7-tetrazocine (HMX) and hexahydro-1,3,5-trinitro-1,3,5-triazine (RDX) from the environmental samples. Aqueous solution of anionic surfactant SDS was used for the extraction of both nitramine high explosives, viz., HMX and RDX from soil samples which were subsequently sorbed on SPME fiber. The static desorption was carried out in the desorption chamber of the SPME-HPLC interface in the presence of mobile phase ACN/methanol/water (30:35:35) and the subsequent chromatographic analysis at a flow rate of 0.5 mL/min and detection at 230 nm. For this purpose, a C(18), 5 microm RP analytical column was used as a separation medium in this method. Several parameters relating to SPME, e.g., adsorption/desorption time, concentration of salt, stirring rate, etc., were optimized. The method was linear over the range of 20-400 ng/mL for HMX and RDX standards in the presence of surfactant in aqueous phase, respectively. The correlation coefficient (R(2)) for HMX and RDX are 0.9998 and 0.9982, respectively. With SPME, the detection limits (S/N = 3) in ng/mL are 0.05 and 0.1 for HMX and RDX, respectively in the presence of the SDS surfactant. The developed method has been applied successfully to the analysis of real environmental samples like bore well water, river water, and ground alluvial soil.