A novel magnetic polyethyleneimine modified reduced graphene oxide (Fe3O4@PEI-RGO) had been prepared and then was successfully employed to extract three polar non-steroidal anti-inflammatory drugs (NSAIDs) in different water matrices for the first time coupled with high performance liquid chromatography-diode array detector (HPLC-DAD). The magnetic polyethyleneimine (Fe3O4@PEI) composite was first synthesized via one-pot hydrothermal approach and then the Fe3O4@PEI-RGO composite was fabricated on the basis of a simple self-assemble approach between positive charged Fe3O4@PEI and negative charged GO sheets via electrostatic interaction followed by chemical reduction of GO to RGO. The as-prepared Fe3O4@PEI-RGO composite was carefully characterized by transmission electron microscopy (TEM), Fourier transform infrared spectrometry (FT-IR), X-ray diffraction (XRD), thermal gravimetric analyzer (TGA), vibrating sample magnetometer (VSM) and zeta potential analysis. As a surface modifier of RGO, PEI not just changed the polarity of RGO to some extent but also offered more adsorption sites to polar NSAIDs. Compared with Fe3O4@PEI, Fe3O4-RGO and Fe3O4@PEI-GO, the as-prepared Fe3O4@PEI-RGO composite, which combined the advantage of PEI and RGO, showed higher extraction efficiency for polar NSAIDs. In addition, the adsorption mechanism was also studied. The analytical parameters influencing the extraction efficiency were optimized in detail. A satisfactory performance was obtained under the optimal conditions. The calibration lines were linear over the concentration in the range of 1–800 μg L−1 for all the analytes with determination coefficients (r2) varying from 0.9972 to 0.9986. The limits of detection (LODs) were 0.2 μg L−1. The recoveries were between 91.20% and 101.13% with relative standard deviations (RSDs) in the range of 1.09–7.34%. Overall, a fast, convenient, sensitive and eco-friendly method was successfully proposed and became a promising approach for the determination of trace polar NSAIDs in complex matrices.