Water-in-diesel (W/D) emulsion fuel is a potentially viable diesel fuel that can simultaneously enhance engine performance and reduce exhaust emissions in a current diesel engine without requiring engine modifications or incurring additional costs. In a consistent manner, the current study examines the impact of adding water, in the range of 5–30% wt. (5% increment) and 2% surfactant of polysorbate 20, on the performance in terms of brake torque (BT) and exhaust emissions of a four-cylinder four-stroke diesel engine. The relationship between independent factors, including water addition and engine speed, and dependent factors, including different exhaust released emissions and BT, was initially generated using machine learning support vector regression (SVR). Subsequently, a robust and modern optimization of the sea-horse optimizer (SHO) was run through the SVR model to find the optimal water addition and engine speed for improving the BT and lowering exhaust emissions. Furthermore, the SVR model was compared to the artificial neural network (ANN) model in terms of R-squared and mean square error (MSE). According to the experimental results, the BT was boosted by 3.34% compared to pure diesel at 5% water addition. The highest reduction in carbon monoxide (CO) and unburned hydrocarbon (UHC) was 9.57% and 15.63%, respectively, at 15% of water addition compared to diesel fuel. The nitrogen oxides (NOx) emissions from emulsified fuel were significantly lower than those from pure diesel, with a maximum decrease of 67.14% at 30% water addition. The suggested SVR-SHO model demonstrated superior prediction reliability, with a significant R-Squared of more than 0.98 and a low MSE of less than 0.003. The SHO revealed that adding 15% water to the W/D emulsion fuel at an engine speed of 1848 rpm yielded the optimum BT, CO, UHC, and NOx values of 49.5 N.m, 0.5%, 57 ppm, and 369 ppm, respectively. Finally, these outcomes have important implications for the potential of the SVR-SHO approach to minimize engine exhaust emissions while maximizing engine performance.