Abstract. In the context of rapid urbanization, accurate assessment of urban expansion has become increasingly important for urban sustainable development, and smart growth theory has been put forward to avoid urban sprawl. Previous studies about urban expansion simulation focused only on ecological constrain which prevent urban growth from developing in specific regions. However, government decision-making and urban planning greatly influence urban development and limit the disorderly expansion of the urban. In this paper, we consider planning policies into urban simulation and uses the ecological protection red line, farmland protection red line and cultural protection control line as limiting factors for future urban simulation. Choosing Shanghai as the study area, we integrated Random Forests Algorithm (RFA), Markov chain and Cellular Automata (CA) to simulate urban expansion in 2015, and further predict the urban expansion in 2020, 2025 and 2030. The results show that the overall accuracy of urban land use simulation in 2015 is 93.86%, and the kappa coefficient is 0.8577. The model has a good simulation effect. Furthermore, the predicted results in 2020, 2025 and 2030 show that the urban land area in Shanghai is still increasing, and the spatial distribution of urban land has obvious circle structure and regional differences. The urban areas within 10km from the city center are growing slowly, and the region within 30km from the city center is growing faster, and there are more new urban points from 2025 to 2030. But in the area 30km away from the city center, different administrative areas show different urban growth phenomena. Among them, there are a large number of new urban points in the junction area between Songjiang District and Jinshan District, which may be the focus of future urban development planning in Shanghai. The proposed model and the results can help planners study the evolution of urban patterns and develop further urban planning.