A magnetic polymer was molecularly imprinted with hippuric acid (HA) to obtain a nanomaterial with an architecture of type Fe3O4@SiO2@MIP. It was used as a sorbent for magnetic solid phase extraction of HA and methylhippuric acids (2-MHA, 3-MHA, 4-MHA) from urine samples. The respective imprinting factor are 4.6, 2.7, 2.0 and 1.8, respectively, and the selectivity coefficients are 1.7, 2.3 and 2.6. The effects of adsorbent amount, extraction time, pH value, ionic strength, desorption solvent and desorption time on the extraction of HA and MHA were investigated. Following elution with 1mM NaOH solution, the 4 HAs were quantified by ultra-performance liquid chromatography with mass spectrometric detection. Under the optimal experimental conditions, the limits of detection (at S/N = 3) range between 89ng·L-1 (for HA) and 170ng·L-1 (for 4-MHA), the limits of quantification (at S/N = 10) range between 300ng·L-1 (for HA) and 570ng·L-1 (for 4-MHA), the linear range extends from 500ng·L-1 to 10mg·L-1, the relative standard deviations of intra-day range between 6.4 and 9.6% (for n = 6 at 10μg·L-1) and inter-day range between 9.2 and 11.5% (for n = 6 at 10μg·L-1). The method was successfully applied to the analysis of HA and MHA in (spiked) urine, and good recoveries were obtained. Graphical abstract Schematic presentation of a method for the determination of hippuric acid (HA) and methylhippuric acid (MHA) in urine sample. The preparation of Fe3O4@SiO2@MIP includes three steps: (1) Preparation of Fe3O4 nanoparticles (NPs), (2) Preparation of Fe3O4@SiO2 and (3) Preparation of a molecular imprint in the surface of the nanoparticles (Fe3O4@SiO2@MIP). The MIP was usedas a sorbent formagnetic solid phase extraction (MSPE) of thetoluene exposure biomarkers.