In this study, diverse types of Fe3O4 nanocomposites modified by polyaniline, polypyrrole, and aniline-pyrrole copolymer were synthesized through chemical oxidative polymerization process for dispersive-μ-solid phase extraction (D-μ-SPE) in the presence of various dopants. The results showed that the nanocomposite modified by polyaniline with p-toluene sulfonic acid as a dopant demonstrated higher extraction efficiency for lorazepam (LRZ) and nitrazepam (NRZ). Also the synthesized magnetic sorbents were characterized. The nanocomposite sorbent in combination with high performance liquid chromatography-UV detection was applied for the extraction, preconcentration and determination of lorazepam and nitrazepam in urine and plasma samples. Different parameters influencing the extraction efficiency including: sample pH, amount of sorbent, sorption time, elution solvent and its volume, salt content, and elution time were optimized. The obtained optimal conditions were: sample pH, 6; amount of sorbent, 5 mg; sorption time, 5.0 min; elution solvent and its volume, 0.5 mM cethyltrimethyl ammonium bromide in acetonitrile, 150 μL; elution time, 2.0 min and without addition of NaCl. The calibration curves were linear in the concentration range of 1-2000 μg L(-1). The limits of detection (LODs) were achieved in the range of 0.5-1.8 μg L(-1) for NRZ and 0.2-2.0 μg L(-1) for LRZ, respectively. The percent of extraction recoveries and relative standard deviations (n=5) were in the range of 84.0-99.0, 6.1-7.8 for NRZ and 90.0-99.0, 4.1-7.0 for LRZ, respectively. Ultimately, the applicability of the method was successfully confirmed by the extraction and determination of NRZ and LRZ in human urine and plasma samples.