Nanoplastics (NPs) are emerging water contaminants that threaten human health and ecological security. Developing a method for detecting NPs is significant because of their biological toxicity and mobility. In this study, magnetic solid‐phase extraction (MSPE) combined with pyrolysis gas chromatography‐mass spectrometry (Py‐GC/MS) was used for the pretreatment and qualitative detection of NPs in complex matrices to avoid sample dissolution and eluent usages. The developed methodology can quickly achieve low detection limits in tap and river water, with 0.7283 and 0.6474 µg/L, respectively. To enrich NPs in water, magnetic biochars derived from cornstalks (Fe3O4/BCs, i.e., Fe3O4/YMG and Fe3O4/YMG‐ZnCl2) were conveniently fabricated using activation and coprecipitation methods and employed as adsorbents for MSPE. The results indicated that the incorporation of Fe3O4 into BC not only rendered it magnetic but also enhanced the diversity of its surface functional groups and adsorption sites, making it suitable for MSPE. Fe3O4/YMG‐ZnCl2 demonstrated excellent extraction and enrichment capacity for polystyrene NPs (PSNPs) over various competitive species. Additionally, it exhibited good resistance to pH and anions, and its reaction mechanism was verified using adsorption kinetics and isothermal models. In addition, after extracting PSNPs from tap and river water using Fe3O4/YMG‐ZnCl2, they were successfully qualitatively analyzed by Py‐GC/MS.