In this work, an imidazolium-based poly(ionic liquid) (poly(1-dodecyl-3-vinyl-imidazolium bromide) functionalized magnetic three-dimensional graphene oxide (Fe3O4@3D-GO@poly(ImC12+Br−)) was synthesized via a vacuum freezing-drying method and used as a magnetic solid phase extraction (MSPE) adsorbent for the efficient extraction of pyrethroid pesticides from tea samples. The prepared Fe3O4@3D-GO@poly(ImC12+Br−) was confirmed by scanning electron microscopy (SEM), Fourier transform infrared spectrometry (FT-IR), vibrating sample magnetometer (VSM) and X-ray photoelectron spectrogram (XPS). Due to its large specific surface area and the ability to offer multiple intermolecular interactions, including π-π stacking, hydrophobic and hydrogen bond interactions, the prepared Fe3O4@3D-GO@poly(ImC12+Br−) showed high extraction efficiency for pyrethroids. The experimental parameters were optimized by a combination of single-factor method and Box-Behnken design to improve the extraction efficiency. Under the optimum conditions, coupled with high performance liquid chromatography (HPLC), a sensitive analytical method was developed for the determination of pyrethroids, and the proposed method showed wide linear ranges (1.00–100 μg L−1) with correlation coefficients (R) ranging from 0.9980 to 0.9994, low limits of detection (0.100 μg L−1) and good repeatability with intra-day relative standard deviations (RSDs) in the range of 2.90–5.53 % and inter-day RSDs in the range of 1.83–7.76 %. Moreover, the developed method was successfully applied to the determination of pyrethroids in tea samples and satisfactory recoveries ranging from 82.37 % to 114.34 % were obtained. The results showed that the developed Fe3O4@3D-GO@poly(ImC12+Br−) was an ideal, effective and selective material for the extraction and enrichment of pyrethroids from tea samples.