The availability of clean water is insufficient to meet our needs because of both the rapid population growth and the advancement of technology. Heavy metals introduced into the water as a result of various activities cause major problems and create an unfavorable scenario in terms of sustainability. In this study, a specially designed electrodialysis cell was used to remove chromium (VI) and nickel (II) ions from effluents. The compartments were divided by Ionac MC 3470 cation exchange and Ionac MA 3475 anion exchange membranes. The cathode and anode were made of carbon fiber and stainless steel, respectively. The effects of voltage, initial pH, time, Na2SO4 concentration, feed flow rate, and metal ion concentration on metal removal efficiency, energy consumption, current efficiency, current density, and flux were investigated. The optimum values for 97.9 ± 1% removal of 50 mg/L Cr (VI) ions in 90 min are voltage 25 V, pH = 3, Na2SO4 addition 0.1 g and feed flow rate 40.3 mL/min, as observed. At the end of this period, the concentration was calculated as 1.05 mg/L, the energy consumption was 38.57 ± 0.01 Wh/L, the current efficiency was 28.56 ± 1.5%, and the flux was calculated as 10.87 × 10−5 ± 0.15 mol/m2s. Optimal values were observed as 20 V, pH = 3, Na2SO4 addition of 0.1 g, and feed flow rate (Qf) = 40.3 mL/min for 92.3 ± 1% removal of 50 mg/L Ni(II) ions in 90 min. The concentration of nickel ions at the end of this period was 3.85 mg/L, the energy consumption was 32.14 ± 0.01 Wh/L, the current efficiency was 95.11 ± 1.5%, and the flux was calculated to be 37.71 × 10−5 ± 0.15 mol/m2s. Effective removal of Cr (VI) and Ni (II) ions from dilute wastewater can be achieved using a cost-effective ED cell in electrodialysis, with reasonable energy consumption and high current efficiency under optimal process conditions. Graphical abstract: [Figure not available: see fulltext.].