A magnetic porphyrin-based porous organic polymer (M-PPOP) with good porosity, high surface area and strong magnetism was prepared and employed as the adsorbent for the magnetic solid phase extraction of the phenylurea herbicides (metoxuron, monolinuron, chlorotoluron, and buturon) from bottled grape juice and tomato samples prior to their determination by high performance liquid chromatography. Under the optimized conditions, the developed method exhibited a good linear range, low limits of detection, low relative standard deviations (<6.8%), good method recoveries between 80.8% and 117%, and high enrichment factors (51–106). For a better elucidation of the adsorption of the M-PPOP towards the analytes, the extraction performance of the M-PPOP for different types of organic compounds including polycyclic aromatic hydrocarbons, phenylurea insecticides, phenylurea herbicides and phenols was studied. The results indicated that the π- stacking, hydrogen-bonding and hydrophobic interactions between the M-PPOP and the analytes played a main role for the adsorption. The results revealed that the M-PPOP material had a great potential for the enrichment of more organic pollutants from real samples.