An easy preparation of g-C3N4/Fe3O4 nanocomposites by chemical co-precipitation has been demonstrated. The as-prepared materials were characterized by X-ray diffraction, transmission electron microscopy, Fourier transform infrared spectroscopy and thermogravimetric analysis. The high affinity of g-C3N4 toward polycyclic aromatic hydrocarbons and the magnetic behavior of Fe3O4 were combined to provide an efficient and simple magnetic solid phase extraction (MSPE). The adsorption and desorption of polycyclic aromatic hydrocarbons on g-C3N4/Fe3O4 were examined. Different factors affecting the magnetic solid phase extraction of polycyclic aromatic hydrocarbons were assessed in terms of adsorption, desorption, and recovery. Under the optimized conditions, the proposed method showed good limits of detection (LOD, S/N=3) in the range of 0.05-0.1 ng mL(-1) and precision in the range of 1.8-5.3% (RSDs, n=3). This method was also successfully applied to the analysis of real water samples; good spiked recoveries over the range of 80.0-99.8% were obtained.