Nanofiltration membranes are of great significance to the treatment of dye wastewater. Interfacial polymerization is a widely used method to fabricate nanofiltration membranes. In this study, the interaction of tannic acid-assisted polyethylene polyamine (PEPA) with terephthalaldehyde (TPAL) was performed on PES ultrafiltration membranes using novel nitrogen-rich amine monomers and relatively less reactive aldehyde-based monomers. A new nanofiltration membrane ((T-P-T)/PES) was prepared by interfacial polymerization. Fourier transform infrared spectroscopy, X-ray photoelectron spectroscopy, and scanning electron microscopy were used to analyze the elemental composition, bonding state, and surface morphology of the membrane surface. The effects of the PEPA deposition time, TPAL concentration, interfacial reaction time, and curing time on the nanofiltration layer were investigated. The modified membrane, prepared under optimal conditions, showed strong dye separation ability. The permeation of the modified membrane could reach 68.68 L·m−2·h−1·bar−1, and the rejection of various dyes was above 99%. In addition, the (T-P-T)/PES membrane showed good stability during long-term dye separation.