Data-driven modelling techniques have recently been used in the development of engine design and control systems for defining the engine in-cylinder complex combustion process. The aim of this investigation is to improve exhaust emissions and fuel consumption by designing an electromechanical exhaust gas recirculation (EGR) cooling system consisting of an electric water pump and fan unlike conventional systems. To determine the effects of the EGR ratio and the temperature of the exhaust gas entering the intake manifold on the diesel engine parameters of nitrogen oxides (NOx) emission and brake specific fuel consumption (BSFC), four learning (ML) algorithms were adapted according to statistical evaluation criteria such as root mean squared error (RMSE), coefficient of determination (R2), mean squared error (MSE) and mean absolute error (MAE). The hyper parameters of the selected best model among four learning algorithms were determined by using grid search method. The results showed that the Gaussian process regression model (GPR) outperformed other ML models according to success error prediction of NOx and BSFC. Then, performance of the designed electromechanical EGR cooling system was analyzed under global driving conditions, the New European driving cycle (NEDC), and the world-wide harmonized light duty test procedure (WLTP). In these test cycles, global optimization was utilized with the GPR model as the objective function based on minimizing NOx and BSFC. Consequently, this study demonstrates the potential of the proposed system based on ML-GA to reduce NOx and BSFC by achieving reductions of 13.7%(NEDC)–9.98%(WLTP) and 2.61%(NEDC)–2.07%(WLTP) in NEDC and WLTP conditions, respectively compared to the conventional EGR cooling approach.