The ecological security pattern (ESP) is an efficient method for identifying priority protection zones and preserving regional security. The study of the ESP in arid urban agglomerations is in its infancy, and there is currently no established research paradigm. The study focused on the urban agglomeration on the northern slope of the Tianshan Mountains (UANSTM), located on the northern side of the Tianshan Mountains. To determine the factors influencing the development of ecosystem services (ESs) from 1990 to 2030, we used the PLUS model, ecosystem service accounting model (InVEST), and Mantel test. Combining the results mentioned above with the MSPA-Circuit theory allows us to establish and optimize the ESP in UANSTM. The results showed that between 1990 and 2030, UANSTM saw considerable changes in land use and an increase in construction land and cropland, reflecting the growing urbanization trend that will inevitably lead to the occupation of ecological lands, including forestland and grassland. Large fluctuations in the ESs were triggered by substantial changes in land use during the study period. According to the predicted results, the ES scenario had the smallest area of low-value land, which is consistent with the subsequent development status. Moreover, precipitation, slope, elevation, evapotranspiration, and NDVI on the four ESs type are also found to be major driving factors. Precipitation and NDVI are severely constrained by evapotranspiration, reflecting the characteristics of arid regions. Finally, we took good connectivity ecological patches are identified as ecological sources in ES scenario, Urumqi as the main ecological core, proposed the ecological optimization pattern of UANSTM from the viewpoint of “point and line to plane” and advocated for the “multi-core, nine districts, eight belts, and one road” to advance the development of the “Silk Road Economic Belt”. Urban agglomeration construction and land space planning in arid regions can benefit from the results of this study.