A novel desalination generator was reported based on a dual-ions electrochemical reaction, which is able to generate electricity during the deionization process. The system demonstrates a stable salt removal capacity of 68.5 mg g–1. The salt is removed during the discharge process, which opens the opportunity to provide fresh water and power concurrently for future smart cities.