In this work, monodisperse and nano‐porous poly(bismaleimide‐co‐divinylbenzene) microspheres with large specific surface area (427.6 m2/g) and rich pore structure were prepared by one‐pot self‐stable precipitation polymerization of 2,2′‐bis[4‐(4‐maleimidophenoxy) phenyl] propane and divinylbenzene. The prepared poly(bismaleimide‐co‐divinylbenzene) microspheres were employed as dispersive solid‐phase extraction (DSPE) adsorbent for the extraction of triazine herbicides. Under optimized conditions, good linearities were obtained between the peak area and the concentration of triazine herbicides in the range of 1–400 µg/L (R2 ≥ 0.9987) with the limits of detection of 0.12–0.31 µg/L. Triazine herbicides were detected using the described approach in vegetable samples (i.e., cucumber, tomato, and maize) with recoveries of 93.6%–117.3% and relative standard deviations of 0.4%–3.5%. In addition, the recoveries of triazine herbicides remained above 80.7% after being used for nine DSPE cycles, showing excellent reusability of poly(bismaleimide‐co‐divinylbenzene) microspheres. The adsorption of poly(bismaleimide‐co‐divinylbenzene) microspheres toward triazine herbicides was a monolayer and chemical adsorption. The adsorption mechanism between triazine herbicides and adsorbents might be a combination of hydrogen bonding, electrostatic interaction, and π‐π conjugation. The results confirmed the potential use of the poly(bismaleimide‐co‐divinylbenzene) microspheres‐based DSPE coupled to the high‐performance liquid chromatography method for the detection of triazine herbicide residues in vegetable samples.