A simple, sensitive and rapid solid phase extraction technique was used for preconcentration of trace levels of Ondansetron (OND) in different real samples followed by UV-Vis spectrophotometry detection. By using a batch method, Active carbon-Fe3O4-pyridine (AC-Fe3O4-Py) was used as adsorbent to preconcentration of OND in the sample solution. After elution of adsorbent with ethanol, the retained analyte was measured at 265 nm by UV-Vis spectrophotometry. FT-IR spectroscopy, Scanning Electron Microscopy (SEM) and Transmission Electron Microscopy (TEM) were used to characterize the synthesized adsorbent. In this study, different parameters affecting the extraction efficiency such as pH, amounts of adsorbent, extraction time, type of eluent solvent, desorption time were investigated and optimum conditions were selected. Under the optimum conditions, the calibration curve was linear in the range of 0.02 mg-0.56 mg L-1 OND with a correlation coefficient of 0.9995. The Relative Standard Deviation (RSD) based on five replicate analysis of 0.4 mg L -1 OND was 1.2% and the Limit of Detection (LOD) based on seven replicate analysis of blank was 0.02 mg L-1.