Global climate change and sea level rise have led to increased losses from flooding. Accurate prediction of floods is essential to mitigating flood losses in coastal cities. Physically based models cannot satisfy the demand for real-time prediction for urban flooding due to their computational complexity. In this study, we proposed a hybrid modeling approach for rapid prediction of urban floods, coupling the physically based model with the light gradient boosting machine (LightGBM) model. A hydrological–hydraulic model was used to provide sufficient data for the LightGBM model based on the personal computer storm water management model (PCSWMM). The variables related to rainfall, tide level, and the location of flood points were used as the input for the LightGBM model. To improve the prediction accuracy, the hyperparameters of the LightGBM model are optimized by grid search algorithm and K-fold cross-validation. Taking Haidian Island, Hainan Province, China as a case study, the optimum values of the learning rate, number of estimators, and number of leaves of the LightGBM model are 0.11, 450, and 12, respectively. The Nash-Sutcliffe efficiency coefficient (NSE) of the LightGBM model on the test set is 0.9896, indicating that the LightGBM model has reliable predictions and outperforms random forest (RF), extreme gradient boosting (XGBoost), and k-nearest neighbor (KNN). From the LightGBM model, the variables related to tide level were analyzed as the dominant variables for predicting the inundation depth based on the Gini index in the study area. The proposed LightGBM model provides a scientific reference for flood control in coastal cities considering its superior performance and computational efficiency.