This research presents an innovative approach that integrates computational fluid dynamics (CFD) and machine learning (ML) for the design and optimization of thermal energy storage (TES) systems. Heat discharging parametric analyses conducted using CFD serve as the basis for training ML models, including linear regression, K-nearest neighbor (KNN) regression, gradient boost regression (GBR), XGBoost, LightGBM, and neural network (NN). NN emerges as the most suitable for predicting time-dependent variations of concrete and heat transfer fluid (HTF) temperatures. The trained ML models offer an efficient alternative to traditional CFD simulations, enabling the prediction of temperatures in concrete thermal energy storage (CTES) modules under varying inlet conditions, velocities, and time. Leveraging these ML models, the research demonstrates the design of modular CTES cascaded systems with multiple modules in series and parallel configurations, significantly reducing computational cost and time by over 99% compared to full-scale CFD simulations. For instance, in predicting 4-hour time-dependent thermal behavior, CFD takes 97 s per data point and 238,500 s for a single module, compared to ML models’ 16-20 ms per data point and around 290 s per module, indicating their efficiency and scalability in predicting thermal discharge, especially for modular CTES system design and optimization. ML models also demonstrate computational efficiency for designing CTES systems involving multiple modules, taking approximately 765 s - 1047 s for various CTES system configurations, indicating their effectiveness over CFD in predicting thermal discharge for modular CTES systems. The integration of CFD and ML provides a streamlined workflow for designing and optimizing CTES systems, reducing computational efforts, cost, and time. Moreover, this workflow can be updated with additional training data to implement it for unique modular designs with different conditions. Such a generalization of this ML-based approach makes it applicable to a wide range of thermal energy storage designs and geometries, offering a promising avenue for future research and development in the field of thermal energy storage.