Urban forests can alleviate the urban heat island effect, improve air quality, and improve residents’ mental health. By studying urban forests, these resources can be better used and managed to create more livable urban environments. Therefore, the urban forest in the Taishan region is taken as the research object, and the ecological compensation and sustainable development of urban forest in Tai’an City are deeply analyzed by GIS. It divided the area into forest land, water bodies, wetlands, grasslands, and shrubs as the basic ecosystem types. And through secondary interpretation and combination, a complete urban forest information database was established. To evaluate the comprehensive benefits of urban forests, the analytic hierarchy process was utilized to establish a corresponding evaluation index system. Based on the assessment outcomes of the comprehensive benefits of urban forests in the area, a standard accounting method for urban forest ecological compensation was proposed. The results showed that each index of the comprehensive benefits of urban forests and the random consistency ratio were both less than 0.1. This indicated that the matrix calculation results of various indicators of urban forest comprehensive benefits had good consistency. At the target level, the comprehensive evaluation score of urban forests in the study area was 7.69. At the factor level, the weight value of the urban forest landscape structure was 0.675, and the comprehensive score was 7.62. The weight value of urban forest comprehensive benefits was 0.325, and the comprehensive score was 7.82. The quantitative weight value of urban forest greening in the study area was 0.6138, with a comprehensive score of 7.57. Based on the analysis of the issues in urban forests and ecological compensation in the research area of Tai’an City, corresponding ecological compensation strategies have been proposed. It is of great value to study the urban forest of Tai’an city, which can help to formulate more effective urban planning and sustainable development strategies. The research results can also provide a valuable reference and inspiration for the improvement of urban forest ecological environment and biodiversity protection in other areas.