Early identification of fire risk helps to mitigate the possible consequences incurred by fire, and meanwhile helps optimize the allocation of rescue resources. In this paper, we propose a comprehensive machine learning-based approach for predicting fire risk. The study area is divided into multiple 1 km × 1 km grid cells, and fire incident records, Point of Interest (POI) data, and meteorological data are geographically mapped to these grid cells. By applying the k-means clustering algorithm to analyze monthly fire occurrences, fire risk levels are assigned to each grid cell. A dataset is constructed with the target variable being the fire risk level and the predictive variables being POI data and meteorological data. After undergoing feature engineering, the dataset is divided into training and testing sets based on a time span. Deep neural networks, Randomforest, and Extreme Gradient Boosting (XGBoost) algorithms are trained on the training set and combined using a soft voting approach to create the final soft voting-based model (SV-based model). The performance of the SV-based model is rigorously evaluated on the testing set, achieving a prediction accuracy of 98.9 %. When evaluated using the AUC and F1-score as metrics, the scores are 0.92 and 0.98, respectively, surpassing other machine learning models used for comparison. The findings of this research contribute to the field of urban fire risk management and provide valuable insights for decision-makers and urban planners in formulating proactive fire prevention strategies.