Electrodeionization (EDI) is essential for producing ultrapure water in power plants and high-tech industries. Compared with the traditional ion exchange process, EDI does not require high-pollution resin regeneration by acid and alkali reagents. However, the process is markedly energy-intensive, and thus it is crucial to reduce the energy consumption. The reduction may be achieved by optimizing the operating conditions and module design. Previous mathematical models of the EDI process have been based on the mass transfer mechanism of ion removal. However, the water dissociation reactions, which are crucial for the energy efficiency of ion removal and thus EDI optimization, have rarely been considered. In particular, the design of EDI modules has not been studied. In this study, the water dissociation reactions in the EDI model were considered to simulate the ion removal process and energy consumption. In addition, the design variables of the equipment configuration and the operating conditions of an industrial-scale EDI module were optimized to reduce the energy consumption via nonlinear programming. The results show that the energy consumption of the current industrial EDI operation can be reduced by 22.4% when only the operating conditions are optimized. Furthermore, the optimization of the design and operation, based on the annual cost, will lead to a 50.4% decrease in the annual cost. The developed modeling and optimization method will play a critical role in an energy-saving operation and low-cost design of the EDI process.