Taking the northern slope of the Tianshan Mountains (NSTM) in Xinjiang as the research area, this study analyzes the changes in the Production–Living–Ecological (P-L-E) Spaces and their Ecological Environmental Effects, providing a basis for optimizing the spatial pattern of the P-L-E Spaces and regional ecological environment protection in this area. Based on land use data and DEM data, various methods were used for analysis. These methods include the land use transfer matrix, ecological environment quality index, hot spot analysis, ecological contribution rate, and Terrain Position Index. The analysis focused on changes in the spatial pattern of the P-L-E Spaces from 1980 to 2020. It also examined the spatiotemporal distribution of ecological environment quality (EEQ). Furthermore, it explored the differentiation characteristics of EEQ in terrain gradients. The conclusions are as follows: (1) On the NSTM, Ecological Space decreased while Production and Living Space expanded. From 1980 to 2020, Agricultural Production Space increased rapidly. Industrial Production Space also saw rapid growth during this period. Urban Living Space expanded significantly from 1980 to 2020. Rural Living Space experienced steady growth over the same period. Forest Ecological Space initially increased but later decreased. Water Ecological Space showed an initial increase followed by a decrease from 1980 to 2020. (2) The EEQ first remained stable, declined slightly from 2000 to 2010, improved significantly, and then deteriorated from 2010 to 2020. The distribution of EEQ exhibits a “high in the northwest, low in the southeast” pattern. EEQ hot spots on the NSTM are concentrated in the Tianshan Mountains, with clustering increasing in both northern and southern areas. Cold spots are found in the southern, eastern, and northern NSTMs, with aggregation strengthening in the south and north and slightly weakening in the east. Hot spots of EEQ changes on the NSTM show stable distribution, with stronger aggregation from 2000 to 2020. However, aggregation of cold spots has gradually weakened, yet noticeable aggregation persists throughout the study period. (3) There is a significant gradient difference in EEQ distribution. Higher terrain gradients have a higher EEQ. From 1980 to 2020, lower terrain gradients saw improvement, while higher gradients experienced deterioration. The EEQ on the NSTM has declined, showing significant spatial differences, with better quality on the northern side than the southern side. Future efforts should focus on restoring the environment at lower gradients, mitigating deterioration at higher gradients, and enhancing water conservation in the Tianshan Mountains.