Magnetic iron oxide nanoparticles are used for the extraction of a drug from an aqueous solution. In the current study, the magnetic iron oxide nanoparticles were synthesized via a facile coprecipitation approach, and then modified by (3-mercaptopropyl)trimethoxysilane followed by grafting thermosensitive polymer N-isopropylacrylamide and biopolymer chitosan. Structure, morphology, size, thermal resistance, specific surface area, and magnetic properties of the grafted nanosorbent were characterized by using Fourier transform infrared spectroscopy, field emission scanning electron microscopy, transmission electron microscopy, elemental analysis, thermogravimetric analysis, specific surface area analysis and vibrating sample magnetometry. The effective parameters on sorption/desorption of letrozole on grafted magnetic nanosorbent were evaluated. The best sorption of letrozole via the grafted nanosorbent occurred at 20°C at an optimum pH of 7. The extraction of trace letrozole in human biological fluids is investigated and revealed 89.1 and 97.8% recovery in plasma and urine, respectively.