The nanofiltration (NF) membrane with better hydrophilicity, uniform pore size distribution, and dually charged properties is highly desirable to improve the pharmaceutical rejection, especially for the neutral and positively charged pharmaceuticals. Herein, a TpPa membrane was first in-situ crystallized via PTSA-mediated interfacial catalytic polymerization (ICP) strategy using 1,3,5-triformylphloroglucinol (Tp) and p-phenylenediamine (Pa), followed by post-functionalization with PEI to narrow pore size, improve hydrophilicity, and tailor membrane charges to enhance pharmaceutical rejection. PTSA was used as a catalyst to enhance the crystallinity of the TpPa membrane. The PEI introduction narrowed the pore radius from 0.382 nm to 0.272 nm, improved surface hydrophilicity from 74.8°to 37.0°, and shifted surface charge from -19.25 mV to 11.15 mV. This PEI-functionalized TpPa (TpPa-PEI) layers exhibited heterogeneous charges on both sides with a positively charged top and negatively charged bottom. MgCl2 rejection increased from 13.67% to 83.0% without sacrificing water permeance. Additionally, pharmaceutical rejection and the water permeance of the optimal TpPa-PEI membrane exceeded those of the TpPaIP-PEI membrane fabricated without PTSA by about 3.3 and 1.3 times, respectively. Furthermore, compared to the pristine TpPa membranes, the substantially enhanced electropositivity of the optimal TpPa-PEI membrane led to 3-5 times increase in positively charged pharmaceutical rejection (94.1% for propranolol, 97.2% for sulpiride, and 71.2% for metformin). The synergy of negatively charged bottom TpPa-PEI layers and reduced pore size maintained sulfadiazine rejection of 62.1%. Mechanistic study confirmed that PEI penetrated 100 nm into the TpPa layer and cross-linked with the aldehyde groups, leading to tailored chargeability, improved hydrophilicity, and reduced pore size. Via a PEI cross-linking strategy, sub-nanometer channels of crystalline COF layers can be rationally designed, featuring precisely tailored chargeability and hydrophilicity, promising functionalization of the membrane pores and remarkably robust for water reuse.