Water scarcity is a serious global challenge. Capacitive deionization (CDI) technology has become an important solution for freshwater resource development due to its advantages of low energy consumption, environmental friendliness, and operational flexibility. Establishing an accurate correlation between the electrosorption efficiency and system parameters is necessary for CDI performance prediction and optimization. Machine learning (ML) is a data-driven method that can handle the nonlinear behavior and complex interdependencies between parameters in CDI systems. In recent years, various models have been developed for predicting CDI performance metrics and optimizing operational parameters. This review critically evaluates the application of different ML methods in CDI. It outlines a structured workflow for ML modeling, offering theoretical guidance for developing robust models. It systematically assesses the application potential of neural networks, ensemble learning (EL), and reinforcement learning (RL) in CDI, covering model architectures, performance comparisons, and suitable scenarios. It also highlights the trade-offs among different models in accuracy, computational cost, and interpretability. Since no one algorithm is universally optimal for all applications, model selection guidelines are provided. Finally, the key challenges are analyzed in depth, including data scarcity, model interpretability, and the development of high-performance electrode materials. A forward-looking framework for future research is proposed. This work provides key insights for advancing the innovative development of ML-assisted CDI in addressing the global water scarcity crisis.