The positively charged nanofiltration membrane (NF) has a strong repulsive effect on divalent magnesium ions, thus could be applied for the separation of Mg2+/Li+. Chemical grafting modification is an effective way to prepare positively charged membranes. However, it is difficult to achieve chemical modification on the surface of polyamide membrane as the chemical stability of polyamide. By introducing hydroxyl rich monomers (3-[n-tris(hydroxymethyl)methylamino]−2-hydroxypropanesulfonic, HMAH) as active sites in the interfacial polymerization process, the olefin monomers containing quaternary ammonium salt functional groups (acryloxyethyl trimethyl ammonium chloride, ATA) were reacted onto the surface of NF membrane through radical polymerization initiated by cerium ions to obtain positively charged NF membrane. The successful grafting reaction of quaternary ammonium salt monomer onto the surface of NF membrane was verified by Fourier-transform infrared spectroscopy (FTIR), X-ray photoelectron spectroscopy (XPS) and scanning electron microscope (SEM). The membrane with dense and smooth surface layer showed C-N+ characteristic peak in XPS N1s spectra and high isoelectric point. Meanwhile, the as-prepared membrane achieved high MgCl2 rejection of 95.74% and low LiCl rejection of 18.1%, with pure water permeance of 9.43 L·m−2·h−1·bar−1. After 60 hours of mixture filtration experiment, the membrane exhibited good long-term stability, maintaining the ionic separation selectivity over 30, which indicated that the positively charged membrane prepared by grafting method has potential application in the separation of Mg2+/Li+.