In this thesis, magnetic molecularly imprinted polymer was synthesized and used as a sorbent in micro solid phase extraction method for the preconcentration and extraction of diazinon in river water and fruit. The detection of diazinon was performed with ion mobility spectrometer with corona discharge ionization source. The polymer was prepared using melamine and resorcinol as the functional monomers and diazinon as the template molecule. The effect of important parameters in the synthesis of sorbent was studied and optimized. Besides, the influence of critical factors in the extraction and desorption of analyte was also investigated and optimized. The extraction of diazinon was done using 20 mg of sorbent dispersed in the sample solution followed by ultrasonication for 10 min. After extraction, the sorbent was collected using an external magnet and dried under mild nitrogen stream. In the elution step, 50 µl of desorption solvent (n-hexane) was added to the sample vial and ultrasonicated for 5 min. Finally, 5 µl of desorption solvent was injected to the ion mobility spectrometer. The linear range of the method was in the range of 2-200 µg L - 1 and the limit of detection was 0.6 µg L - 1 . The relative standard deviations of the method were less than 9%. The method was applied for the analysis of diazinon in different real samples with good recoveries in the range of 90-110 %.