Evaluating the spatiotemporal variations and driving mechanisms of carrying capacity (CC) is critical for optimizing grassland resource utilization and promoting sustainable development in grassland animal husbandry. This study focuses on Xinjiang, an arid and semi-arid region significantly impacted by environmental changes and human activities. To capture the dynamics of grassland CC, we employed Theil-Sen trend analysis and the Mann-Kendall test to assess spatiotemporal trends. The innovative use of the Geodetector method allowed for a detailed quantification of the influence of various environmental and human-related factors on grassland CC. Additionally, we incorporated livestock data to evaluate the overgrazing conditions of the grassland ecosystem. Our findings demonstrate that: (1) Grassland CC has shown a pronounced overall upward trajectory over the last twenty years, with notable inter-annual fluctuations and significant spatial variations, particularly between the northern and southern regions. (2) The spatial distribution of grassland CC is primarily influenced by precipitation patterns and population density, with key determining factors varying across different types of grasslands. Except for alpine steppe and alpine desert, the spatial distribution of grassland CC was primarily influenced by two-factor interactions, surpassing the impacts of single-factor effects. (3) The overgrazing rate has generally declined, peaking in 2014 and showing the mildest condition in 2017. In comparison, the overgrazing situation in Northern Xinjiang is relatively more favorable, whereas the southern and eastern regions necessitates more immediate and comprehensive ecological restoration and management measures. In summary, this study provides important scientific evidence for prioritizing grassland protection and planning for the sustainable animal husbandry development in arid and semi-arid regions.