Floods have a significant economic, social, and environmental impact in developing countries like India. Settlements in flood hazard zones increase flood risk due to a lack of information and awareness. The present study proposed a machine learning-based framework to identify such flood risk zones for the lower Narmada basin in India. Flood hazard factors like elevation and slope of the terrain, distance from main river network, drainage density, annual average rainfall of the area, and land-use land-cover (LULC) characteristics, as well as flood vulnerability factors like population density, agricultural production, and road–river intersections, were used as predictors in the random forest algorithm to predict the flood depth in the region. Initially, the flood depth obtained from the hydrodynamic model was used as a predict and to train the model and determine the weightage of each predictor. The RandomizedSeachCV technique was used to optimize hyperparameters of the random forest algorithm. The obtained results from variable importance of random forest show that the elevation of the terrain, LULC characteristics, distance from the main river network, and rainfall are the major contributors to cause flood risk in the area. Furthermore, the possibility of using the IoT-based sensor to develop the real-time flood risk mapping framework is described. The developed flood risk map can assist policymakers, stakeholders, and citizens in developing guidelines, taking preventive measures, and avoid unnecessary settlements in flood risk zones.