Polyamide nanofiltration (NF) membranes with enhanced desalination and fouling resistance were fabricated via grafting N,N-dimethyl-N-2-propenyl-2-propene-1-ammonium chloride-2-propenamide (polyquaternium-7, PQ7), which consists of dimethyl diallyl ammonium chloride and acrylamide monomers. Compared to the control polyamide NF membrane, the PQ7grafting membrane exhibited higher hydrophilicity, rougher membrane surface, and stronger positive charge. The surface grafting process had no distinct influence on membrane thickness. After modification, the water flux of the resulting membrane improved from 47.8 to 79.6 L m −2 h −1 under 5 bar, showing a significant improvement in permeability. Meanwhile, the rejection to divalent ions was elevated to a superior level due to the introduction of the positively charged quaternary ammonium groups from PQ7. Furthermore, the antifouling evaluation indicated that the modified polyamide NF membrane owed superior flux recovery capacity and fouling resistance to both sodium alginate solution and bovine serum albumin. Owing to the low cost of the surface modifier and facile grafting process, this strategy has wide application potential in fabricating superior NF membranes used for water softening.