As the basis of social sustainable development, eco-environmental quality (EEQ) plays an essential role in the process of high-quality urbanization (HQU). Therefore, evaluating the response mechanism of EEQ in the context of HQU will provide effective guidance for promoting sustainable development. Based on the requirements of high-quality development and the component elements of urbanization and eco-environment, the appropriate variables were selected to construct an evaluation index system between HQU and EEQ of the Shandong Peninsula urban agglomeration (SPUA) in north China. This study employed the improved coupling coordination degree (CCD) model and Moran's I to explore the dynamic mechanism and spatiotemporal distribution of coupling coordination between HQU and EEQ of the SPUA from 2001 to 2020. Meanwhile, the random forest model and the geographically and temporally weighted regression model were used to further investigate the variation in importance and spatiotemporal heterogeneity of the HQU indicators affecting EEQ. This study found that the CCD between HQU and EEQ followed a continuous upward trend in the SPUA from 2001 to 2020, which was much higher in eastern developed cities with a spatial dependency of high-high clustering. Due to the irreplaceability of energy in residents' lives, per capita energy consumption was found to be the most important impact indicator on EEQ. Population density achieved the fastest growth in importance over the study period, and the spatial indicators exhibited greater importance in the west of the SPUA. Furthermore, significant spatiotemporal differences were identified in the effects of HQU indicators on EEQ. HQU was more conducive to an improvement of EEQ in the eastern coastal SPUA. These findings could provide guidance for policy makers to adopt scientific measures in rational urban planning and ecological management of urban agglomerations in developing countries.