Water-in-diesel (W/D) emulsion fuel is a potential alternative fuel that can simultaneously lower NOx exhaust emissions and improves combustion efficiency. Additionally, there are no additional costs or engine modifications required when using W/D emulsion fuel. The proportion of water added and engine speed is crucial factors influencing engine behavior. This study aims to examine the impact of the W/D emulsion diesel fuel on engine performance and NOx pollutant emissions using a compression ignition (CI) engine. The emulsion fuel had water content ranging from 0 to 30% with a 5% increment, and 2% surfactant was employed. The tests were performed at speeds ranging from 1000 to 3000 rpm. All W/D emulsion fuel was compared to a standard of pure diesel in all tests. A four-cylinder, four-stroke, water-cooled, direct-injection diesel engine test bed was used for the experiments. The performance and exhaust emissions of the diesel engine were measured at full load and various engine speeds using a dynamometer and an exhaust gas analyzer, respectively. The second purpose of this study is to illustrate the application of two optimizers, grey wolf optimizer (GWO) and intelligent grey wolf optimizer (IGOW), along with using multivariate polynomial regression (MPR) to identify the optimum (W/D) emulsion blend percentage and engine speed to enhance the performance, reduce fuel consumption, and reduce NOX exhaust emissions of a diesel engine operating. The engine speed and proportion of water in the fuel mixture were the independent variables (inputs), while brake power (BP), brake thermal efficiency (BTE), brake-specific fuel consumption (BSFC), and NOx were the dependent variables (outcomes). It was experimentally observed that utilizing emulsified gasoline generally enhances engine performance and decreases emissions in general. Experimentally, at 5% water content and 2000 rpm, the BSFC has a minimal value of 0.258 kJ/kW·h. Under the same conditions, the maximum BP of 11.6 kW and BTE of 32.8% were achieved. According to the IGWO process findings, adding 9% water to diesel fuel and running the engine at a speed of 1998 rpm produced the highest BP (11.2 kW) and BTE (33.3%) and the lowest BSFC (0.259 kg/kW·h) and reduced NOx by 14.3% compared with the CI engine powered by pure diesel. The accuracy of the model is high, as indicated by a correlation coefficient R2 exceeding 0.97 and a mean absolute error (MAE) less than 0.04. In terms of the optimizer, the IGWO performs better than GWO in determining the optimal water addition and engine speed. This is attributed to the IGWO has excellent exploratory capability in the early stages of searching.