Urban green spaces (UGS) significantly influence the distribution of surface heat and play a crucial role in regulating surface temperature. However, the quantitative relationship between UGS and surface temperature remains unclear, necessitating further research. This study aims to predict surface temperature based on green space information from GaoFen-2 satellite data. To achieve this, GaoFen-2 data were utilized to obtain spatial distribution and vegetation growth status in Urumqi, Xinjiang. Three machine learning models such as Support Vector Machine (SVM), Random Forest (RF), and Gradient Boosting Regression Tree (GBRT) were constructed to predict surface temperature. Results indicated that UGS information extracted from GaoFen-2 data using the U-Net semantic segmentation model successfully predicted surface temperature. Among the three machine learning models, GBRT exhibited the highest predictive accuracy with an Radj2 of 0.81, RMSE of 0.44, and RPD of 2.29, followed by RF (Radj2 of 0.80, RMSE of 0.45, and RPD of 2.22), and SVM (Radj2of 0.79, RMSE of 0.47, and RPD of 2.15), In addition, a variable importance assessment reduced the original 44 variables to 28, maintaining predictive accuracy with the GBRT model achieving an Radj2 of 0.81, RMSE of 0.43, and RPD of 2.3. Our study demonstrates the effectiveness of using vegetation information derived from GaoFen-2 to predict surface temperature. This approach provides valuable recommendations for the layout of UGS in urban areas and serves as a comprehensive reference for urban planning and real estate development.