Core-shell structured magnetic covalent organic frameworks (Fe3O4@COFs) were synthesized via a facile approach at room temperature. Combining the advantages of high porosity, magnetic responsiveness, chemical stability and selectivity, Fe3O4@COFs can serve as an ideal absorbent for the highly efficient enrichment of peptides and the simultaneous exclusion of proteins from complex biological samples.