Ants (Hymenoptera: Formicidae) represent the most critical arthropod community in desert ecosystems, where interactions among vegetation, soil, and climate dictate ant assemblages. Nonetheless, our understanding of how various factors influence desert ant assemblages across different spatial and temporal scales remains limited. Therefore, this study aims to analyse the temporal and spatial distribution patterns of desert ants and to determine the effects of precipitation and temperature variations on ant assemblages. To achieve this, we continuously monitored the monthly dynamics of ants at 72 uniform 8m × 8m grid points in the Gobi Desert ecosystem of Northwest China from 2015 to 2020 using pitfall traps. The results indicated that Messor desertus and Cataglyphis aenescens were the dominant ant species, with significant annual and monthly variations in the number of individuals captured from 2015 to 2020. In 2020, monthly captures of M. desertus exhibited a bimodal pattern, peaking in November, whereas those of C. aenescens exhibited a unimodal pattern, peaking in June. Annual data revealed that population size was significantly positively correlated spatially at a distance of 24 meters. Semi-variance analysis and Moran’s I indicated that structural factors predominantly controlled the ant assemblages at a small scale from 2015 to 2020. Annual catches of desert ants tended to decrease with increasing annual precipitation, while an opposite trend was rising average annual temperatures. In conclusion, variations in annual and monthly precipitation and temperature influenced the temporal response patterns of desert ants, thereby altering their spatial assemblages.