Zwitterionic membranes demonstrate excellent antifouling property in water purification. The covalent organic frameworks (COFs), due to the ordered channels and abundant organic functional groups, have distinct superiority in constructing zwitterionic surfaces.Here, the zwitterionic COF membrane is prepared with precise framework structures and uniform charge distribution. The negatively charged 4,4'-diaminobiphenyl-2,2'-sisulphonic acid sodium (SA) and positively charged ethidium bromide (EB) fragments are used to react with 1,3,5-triformylphloroglucinol (TP) at the gas-liquid interface to prepare zwitterionic COF membrane. The complementary charged fragments in the inter-layer and inner-layer facilitate the formation of continuous and tight hydration layer on the membrane surface and pore walls to resist the adsorption of pollutants. The zwitterionic COF membrane effectively resists both negatively charged bovine serum albumin and positively charged lysozyme pollutants with flux recovery ratio (FRR) of 97% and 85%, respectively. Furthermore, the regular nano-channels and balanced interactions between water and surface/pore walls of the zwitterionic membrane result in outstanding permeability of up to 146 L m-2 h-1 bar-1 and excellent dye/salt separation selectivity. The water permeation and antifouling mechanism of membranes are elucidated by experimental and molecular dynamics calculation. Zwitterionic COF membranes can find promising applications in preparing high-performance antifouling membranes.