Water is stored in reservoirs for various purposes, including regular distribution, flood control, hydropower generation, and meeting the environmental demands of downstream habitats and ecosystems. However, these objectives are often in conflict with each other and make the operation of reservoirs a complex task, particularly during flood periods. An accurate forecast of reservoir inflows is required to evaluate water releases from a reservoir seeking to provide safe space for capturing high flows without having to resort to hazardous and damaging releases. This study aims to improve the informed decisions for reservoirs management and water prerelease before a flood occurs by means of a method for forecasting reservoirs inflow. The forecasting method applies 1- and 2-month time-lag patterns with several Machine Learning (ML) algorithms, namely Support Vector Machine (SVM), Artificial Neural Network (ANN), Regression Tree (RT), and Genetic Programming (GP). The proposed method is applied to evaluate the performance of the algorithms in forecasting inflows into the Dez, Karkheh, and Gotvand reservoirs located in Iran during the flood of 2019. Results show that RT, with an average error of 0.43% in forecasting the largest reservoirs inflows in 2019, is superior to the other algorithms, with the Dez and Karkheh reservoir inflows forecasts obtained with the 2-month time-lag pattern, and the Gotvand reservoir inflow forecasts obtained with the 1-month time-lag pattern featuring the best forecasting accuracy. The proposed method exhibits accurate inflow forecasting using SVM and RT. The development of accurate flood-forecasting capability is valuable to reservoir operators and decision-makers who must deal with streamflow forecasts in their quest to reduce flood damages.