Preconcentration of trace amounts of diazinon by carbon mesoporous CMK-3 in water and biological samples and measurement by high-performance liquid chromatography were investigated. CMK-3 was prepared using hexagonal SBA-15 as the template. The synthesized materials were characterized by X-Ray diffraction (XRD), Fourier transform infrared spectroscopy, Brunaur-Emmet-Teller, transmission electron microscopy and Boehm titration method. The preconcentration procedure was optimized using a multivariate optimization approach following a two-stage process. The effect of analytical parameters including the amount of the CMK-3 as an adsorbent, pH, type and volume of eluent and flow rate of eluent and sample were studied by a screening project, then the effective parameters were optimized by response surface methodology based on central composite design. The average extraction efficiency of diazinon under optimal conditions (CMK-3 dosage = 25 mg, sample flow rate = 2.5 mL min , eluent flow rate = 1.25 mL min , volume of methanol as an eluent =3.5 mL and initial pH = 6) was 97.11%, which agrees well with the predicted response value (97.93%). The linearity of the method was in the range of 0.5-100 μg L with a correlation coefficient of 0.997. Enrichment factor, limit of detection and limit of quantification were 285.7, 0.09 and 0.23 μg L , respectively. The relative standard deviation (RSD) under optimum conditions was 2.21% (n = 5). The proposed method was applied to determine diazinon in real water and biological samples. Recovery of diazinon from real samples was between 95.80 and 104.94% with an RSD of 0.19-4.65%. Thus, this method is suitable for the preconcentration and determination of diazinon in real water and biological samples.