Urban–rural interlaced zones are characterized by the interpenetration of urban and rural elements, drastic changes in construction, relatively weak planning and management, and anthropogenic activities that constantly impact the ecological background. However, the ecological barriers and hinterland spaces of the city center provide important ecological functions. In this study, we selected forest birds as indicator species of the urban ecological environment and explored the spatial stratification and heterogeneity effects of environmental substrates and anthropogenic activities on bird diversity (species richness, abundance, Shannon–Wiener index, and Simpson index) in urban–rural interlaced zones using the optimal parameter geographic detector model to characterize the changes in ecological functions in these zones. The results of this study are as follows:(1) The bird diversity index in Minhang District, Shanghai, showed an obvious urban-rural gradient divergence with the transition of urban zone- rural-urban interface - rural zone.An agglomerative spatial differentiation pattern was observed more in the southeast but less in the northwest, with a high degree of spatial distribution concentrations and evident imbalance characteristics.(2) The spatially stratified heterogeneity in bird diversity in urban–rural interlaced zones was because of the combined action of multiple driving factors under the three dimensions of habitat environment, degree of urbanization, and anthropogenic interference. Most of the interactions between any two factors showed non-linear or bifactorial enhancement effects. Furthermore, the one-factor explanatory power of urbanization and anthropogenic interference factors on bird diversity was significantly higher than that of the habitat environment factor.(3) Population heat distribution (PD), distance to the center of Shanghai (DC), and nighttime lighting index(NTL) were the main drivers of spatially stratified heterogeneity in bird diversity and the key indicators of urban–rural gradient changes. The interaction between PD and DC had the strongest explanatory power for the spatial differentiation of bird diversity.