Heavy metal contamination in water is a major health concern, directly related to rapid growth in industrialization, urbanization, and modernization in agriculture. Keeping this in view, the present study has attempted to develop models for the process optimization of nanofiltration (NF) membrane and electrocoagulation (EC) processes for the removal of copper, nickel, and zinc from an aqueous solution, employing the response surface methodology (RSM). The variable factors were feed concentration, temperature, pH, and pressure for the NF membrane process; and time, solution pH, feed concentration, and current for the EC process, respectively. The central composite design (CCD), the most commonly used fractional factorial design, was employed to plan the experiments. RSM models were statistically analyzed using analysis of variance (ANOVA). For the NF membrane, the rejection of Zn, Ni, and Cu was observed as 98.64%, 90.54%, and 99.79% respectively; while the removal of these through the EC process was observed as 99.81%, 99.99%, and 99.98%, respectively. The above findings and a comparison with the conventional precipitation and adsorption processes apparently indicate an advantage in employing the NF and EC processes. Further, between the two, the EC process emerged as more efficient than the NF process for the removal of the studied metals.