With the development of covalent organic frameworks (COFs), their superior separation performance in membrane separation has gradually becoming apparent. The method of combining COFs with membrane materials is crucial for their applications prospect. In this study, inspired by the traditional Chinese mortise and tenon structure, we selected 1,3,5-triacetaldehyde mesityl phenol (TFP) and 1,3,5-tris(4-aminophenyl)benzene (TAPB) as the reactive building monomers. P-Phenylenediamine (PDA) was introduced into the casting solution to construct Polyether-sulfone (PES) bottom membranes with amino ligand sites, utilizing the phase transition effect generated by the non-invasive solvent-induced method (NIPS). Subsequently, COFs composite nanofiltration membranes with two-dimensional layered structures were prepared through mild interfacial polymerization (IP) under optimized reaction conditions. The synthesis of COFs composite nanofiltration membranes was demonstrated through a series of characterizations, including scanning transmission electron microscopy and infrared spectroscopy. The COFs composite nanofiltration membranes synthesized by this method exhibited better alignment, greater chemical stability, and higher separation efficiency compared to traditional interracially polymerized COFs composite nanofiltration membranes. As the method involves the addition of additives, it can be more widely applied to a broad range of organic polymer membranes. Furthermore, we demonstrated the effectiveness of the COF composite nanofiltration membranes produced using this method in the separation of molecular dyes. They exhibited rejection exceeding 99% for 0.1 g L−1 methyl blue (MB), Congo red (CR) and chrome black-T (EBT). Additionally, they achieved separation fluxes of up to 300 L m−2 h−1 bar−1 for mixed solutions (dyes/salts) and proved to be effective under extreme conditions, such as 1 M HCl/NaOH. Moreover, COFs-NH2PES composite nanofiltration membranes exhibited the ability to efficiently separate dye molecules of different sizes. This work introduces new ideas for constructing stable and durable COF functional composite membrane materials for practical applications.