A novel strategy is proposed to tackle an optimal dispatch of a microgrid in response to dynamic conditions, utilizing a water wave optimization (WWO) algorithm and considering a day-ahead load forecasting. Amongst meta-heuristic algorithms, the WWO algorithm stands out in terms of population size, parameter tuning, exploitation and exploration, convergence speed, as well as optimization mechanism. It leverages its ability to efficiently explore solution spaces and adapt to changing conditions. It is applied to the dynamic optimal dispatch of a microgrid with the uncertainty of load power considered and solved by day-ahead load forecasting. It dynamically adjusts the microgrid operation in response to these inputs, ensuring optimal decision-making in the face of varying load scenarios. With the competition of various dayahead load forecasting techniques in the microgrid, a multi-variate linear regression (MLR) model shows its advantage features, being more transparent, more effective, and more robust than other techniques, especially transparent explainability, as well as simple and fast in model training. These are requirements to achieve the result of day-ahead load forecasting. Thus, the MLR model is proposed to forecast day-ahead load in the microgrid in this paper. The simulation results show that the percentage error (PE) between the MLR modelbased forecasted and actual load powers is always less than 4.42%, the mean absolute percentage error (MAPE) of the forecasting result is 3.33%, and the execution time is 49 (s). These achievements meet the accurate and fast requirements. They are completely competitive with the results of using other techniques such as convolutional neural networks (CNN) and long short-term memory (LSTM), especially in the execution time. This has contributed to improving the efficiency of the dynamic optimal dispatch in the microgrid. Then, the diesel generation, battery energy storage, and total microgrid generation costs are 68.76 ($), 5.09 ($), and 73.85 ($) respectively by using the WWO algorithm which are better than those by using a genetic algorithm (GA), a non-dominated sorting genetic algorithm-II (NSGA-II), a particle swarm optimization (PSO) algorithm, and a transient search optimization (TSO) algorithm in the microgrid. The findings offer valuable insights for microgrid operators, energy planners, and policymakers seeking sustainable and cost-effective solutions for distributed energy resource management.INDEX TERMS Dynamic optimal dispatch, day-ahead load forecasting, microgrid, water wave optimization algorithm