This work deals with a facile approach to fabricate a novel nanofiltration (NF) membrane consisting of a dense active layer from polyethyleneimine (PEI) cross-linking on a porous polysulphone (PS) substrate which was modified by self-polymerized dopamine (DA). Inspired by the bioadhesion principle, a composite membrane with a poly(dopamine) (poly(DA)) layer was fabricated by simply dipping the PS substrate into DA aqueous solution. Later, the modified PS substrate was thermal-treated and then impregnated into PEI solution for PEI grafting on the poly(DA) layer. Finally, PEI cross-linking was performed and as a result a composite PS/DA/PEIc membrane with a dense cross-linked DA/PEI layer was obtained, which exhibited a typical NF property. Several parameters such as PEI grafting, thermal treatment, cross-linkers and operating conditions were investigated to obtain the optimum composite membrane with an excellent NF performance. The results showed that the optimum NF membrane yielded a permeation flux of 43.96 L/m(2) h and a rejection of 8927% when 2000 mg/L MgCl2 solution was used as a feed solution at 0.8 MPa, whereas a permeation flux of 49.21 L/m(2) h and a rejection of 27.30% were obtained for a feed NaCl concentration of 2000 mg/L. These results show the promising use of such NF membranes in water softening. (C) 2014 Published by Elsevier B.V.