Spatial variations in soil carbon, nitrogen, and phosphorus concentrations, as well as their ecological stoichiometry, in grasslands are related to the function and stability of grassland ecosystems. The Irtysh River Basin exhibits a significant disparity in altitude, remarkable climate variation, and diverse grassland types that display a vertical zonal distribution. Nevertheless, there are no clear data on the influence of altitude, climate, soil properties, and vegetation on the spatial patterns of soil carbon, nitrogen, and phosphorus stoichiometry in the Irtysh River Basin, which is a typical pastoral area in Xinjiang. Therefore, this study investigated 65 sample points from six main grassland types (temperate desert, temperate desert steppe, temperate steppe, temperate meadow steppe, mountain meadow, and alpine meadow) in the Irtysh River Basin at depths of 0-10 and 10-20 cm. The following results were obtained: (1) The soil organic carbon (39.06-62.59 g·kg-1), total nitrogen (3.87-6.95 g·kg-1), and total phosphorus (0.53-1.59 g·kg-1) concentrations of alpine meadow, mountain meadow, and temperate meadow steppe were higher than the average concentrations of Chinese soil. However, the soil C:N (5.03-9.97) and C:P (7.50-52.38) ratios, as well as the soil N:P (1.53-3.72) ratios of temperate steppe, temperate desert steppe, and temperate desert, of the six grassland types were lower than the average ratios of Chinese soil (2) The concentrations of soil carbon, nitrogen, and phosphorus, as well as the C:N and C:P ratios, increased significantly with increasing altitude (328-2655 m) and precipitation and decreasing temperature. These parameters also exhibited significant correlations with soil physicochemical properties and vegetation characteristics. With increasing altitude and precipitation and decreasing temperature, the differences in soil carbon and nitrogen concentrations and soil C:P ratios gradually increased among soil layers. (3) The structural equation model revealed that altitude and climate exerted the highest impact on soil carbon, nitrogen, and phosphorus concentrations, as well as on their ecological stoichiometry. Altitude affected soil carbon, nitrogen, and phosphorus concentrations by changing the temperature, precipitation, vegetation characteristics, and soil physicochemical properties, ultimately affecting ecological stoichiometry. Future research should further explore the impact of climate change on soil carbon, nitrogen, and phosphorus concentrations, as well as on their ecological stoichiometry, at a regional scale. This study provides basic data and a theoretical basis for estimating soil nutrient storage, as well as for protecting and utilizing grassland ecosystems in the Irtysh River Basin.