Species distribution, spatial distance, and neighboring interact6ions are among the most important drivers of global variation in plant species diversity. However, the effects of climate change on the relationship between spatial interactions and species diversity remain unknown. Here, we applied 12 machine learning models to assess the responses of spectral diversity (indicating species diversity) in forests in seven protected forest areas in China. Changes in 27 climatic variables during two time periods, 1990–2005 and 2005–2020, were analyzed. The results indicated that spectral diversity and intraspecific spatial distance have increased significantly with climate change. These results also provide insights into the variations in spectral diversity. Particularly, the contributions of neighboring interactions and plant–plant distances to the variation in species diversity between 1990 and 2000 were greater than the contribution of climate change in all forest types. Our analysis revealed that species diversity, plant–plant interactions, and spatial distance are closely associated with each other and sharply shifted under climate change. From this perspective, spatial interaction analysis—to a greater degree than analysis of community composition—can provide additional insights into the underlying mechanisms of changes in species diversity under current global-warming conditions.