Carbotrap B as a highly pure surface sorbent with excellent adsorption/desorption properties was packed into a stainless steel needle to develop a new needle trap device (NTD). The performance of the prepared NTD was investigated for sampling, pre-concentration and injection of benzene, toluene, ethyl benzene, o-xylene, and p-xylene (BTEX) into the column of gas chromatography-mass spectrometry (GC–MS) device. Response surface methodology (RSM) with central composite design (CCD) was also employed in two separate consecutive steps to optimize the sampling and device parameters. First, the sampling parameters such as sampling temperature and relative humidity were optimized. Afterwards, the RSM was used for optimizing the desorption parameters including desorption temperature and time. The results indicated that the peak area responses of the analytes of interest decreased with increasing sampling temperature and relative humidity. The optimum values of desorption temperature were in the range 265–273°C, and desorption time were in the range 3.4–3.8min. The limits of detection (LODs) and limits of quantitation (LOQs) of the studied analytes were found over the range of 0.03–0.04ng/mL, and 0.1–0.13ng/mL, respectively. These results demonstrated that the NTD packed with Carbotrap B offers a high sensitive procedure for sampling and analysis of BTEX in concentration range of 0.03–25ng/mL in air.