Soil is an important link in the cycling of carbon, nitrogen, and other elements. The soil environment, especially the soil water, nutrients, and salts, undergoes profound changes in the process of oasis evolution. As a key component of the soil ecosystem in an oasis, soil microbial communities are strongly influenced by environmental factors and have feedback effects on them. However, the response of the soil microbial community structure and function to the process of oasis evolution and its mechanism is still unclear. In this study, the effects of different land-use types, including cotton field (CF), orchard (OR), forest land (FL), waste land (WL) and sand land (SL), on the soil microbial community structure and function were analyzed by metagenomic sequencing. The results showed that the cotton field had the highest soil water content, showing a significant difference compared with the other land-use types. Forest land had the highest soil pH, also showing a significant difference compared with the other land-use types. Among the land-use types with different degrees of oasis evolution, Pseudarthrobacter and Actinomycetota were the dominant phyla, with higher relative abundance. The main metabolic pathways in the cotton field, sand land, and waste land were L-glutamine biosynthesis, ornithine cycle, and nitrate reduction V. The soil total salt, moisture content, pH, and available potassium were the important soil physicochemical factors influencing soil microorganisms. This study will deepen our understanding of the role of soil microbial communities in the process of oasis evolution and provide a scientific basis for ecological restoration and desertification control in arid areas.