Under room temperature conditions, a novel thiophene-based magnetic covalent organic framework (COF) was ingeniously synthesized for the first time, utilizing an uncomplicated and benign Schiff base reaction between 4,4′,4″,4‴-(pyrene-1,3,6,8-tetrayl)tetraaniline (PyTTA) and 2,2′-dithiophene-5,5′-dicarboxaldehyde (BTDA), with Fe3O4 serving as the magnetic nucleus. The fabricated Fe3O4@Py-BTDA COF nanocomposite displays superior crystallinity, homogenous pore size distribution, elevated magnetic responsiveness, and extraordinary thermal and chemical stability, which is an ideal sorbent for magnetic solid phase extraction (MSPE) of estrogens in environmental water samples. The presence of thiophene groups within the Fe3O4@Py-BTDA COF significantly bolsters the π-π interaction between the COF and the target analytes, and meanwhile provides sufficient hydrophobic sites and unique p-π interactions, thus becoming a crucial factor in augmenting the extraction efficiency of estrogens. Due to the high boiling point of estrogens, derivatization is necessary before gas chromatography–mass spectrometry (GC–MS) analysis. So, the conditions of derivatization, extraction and desorption were then systematically optimized. Under the optimal MSPE conditions, a rapid and sensitive method coupling MSPE with GC–MS was developed for the analysis of five estrogens in environmental water samples. The method showed good linearity (r2 > 0.9997) in the range of 0.05–100 μg L−1, low detection limits (4.0–7.0 ng/L), good spiked recoveries (91.56 %-105.80 %), and satisfactory relative standard deviations (RSD, less than 7.4 %). In addition, the method was successfully applied to the determination of estrogens in Yangtze River water, East Lake water, and tap water, with the recoveries in the range of 81.33 %-113.95 % and the RSDs in the range of 0.12 % to 7.69 % at different spiked levels. Estrone (E1) and estradiol (E2) were detected in the Yangtze River water with concentrations of 0.31 μg L−1 and 0.08 μg L−1. And, the prepared Fe3O4@Py-BTDA COF nanocomposite still provides good extraction effect after five cycles of application. The developed method is rapid, simple, sensitive, and environmentally friendly, and has good application in the analysis and determination of estrogens in environmental water samples.