In this study, activated carbon/diatomite‐based magnetic nancomposites (denoted as AC/DBMNs) were synthesized and applied as an adsorbent for magnetic solid‐phase extraction of S‐phenylmercapturic acid (S‐PMA) from human urine prior to high‐performance liquid chromatography. The surface morphologies and structures of AC/DBMNs were characterized by Fourier transform infrared spectroscopy, transmission and scanning electron microscopy, X‐ray diffraction, Brunauer–Emmett–Teller surface area, vibrating sample magnetometer and ζ‐potential measurements. The experimental parameters including sample volume, sample pH, adsorbent amount, extraction time, elution solvent and desorption time were investigated in detail. Under the optimum conditions, the method exhibited good linearity (r > 0.9993) within the concentration ranges of 0.03–1.0 mg/L. Moreover, the limits of detection and quantification were 0.01 and 0.03 mg/L, respectively. The enrichment factor was 5, and good recoveries (88.9–97.3%) with relative standard deviations in the range of 5.6–6.8% (n = 6) for inter‐day and 6.3–8.1% (n = 6) for intra‐day were achieved. The developed method was successfully applied to the analysis of S‐PMA in urine samples. In addition, this accurate and sensitive method has great potential to be applied in the early screening and clinical diagnosis of the workers exposed to benzene.