Soil fauna is closely linked to ecological functions such as biogeochemical cycling, soil structure, ecosystem sustainability and trophic interactions. However, little consideration has been given to how desertification influences the abundance and diversity of soil fauna in arid areas. In this study, soil fauna was sampled in four desert habitats (gravel, sand, salt and mud desert) in northwest China. At the same time, the plant traits, geographic location and soil properties were investigated. We also measured contribution of environmental factors explained faunal community diversity and abundance, and by what pathways desertification controls soil fauna. The results showed that total abundance and diversity of soil fauna in the mud desert were significantly (P < 0.05) higher than salt, sand and gravel deserts. Soil fauna diversity, composition and community were more sensitive to desertification-induced changes in soil properties than to changes in plant traits and geographic locations (changes in soil properties explained 68.9 % and 73.7 % of the variation in diversity and abundance of soil fauna community, respectively). Among them, the available phosphorus, volumetric water content had a significant positive effect on community diversity and abundance, while pH had a significant negative effect (P < 0.01). The results of piecewise structural equation modeling imply that desertification may have mainly indirect impacts on soil fauna community, and that direct effects are almost zero. In summary, regardless of the type of desertification, it will affect the material cycle, energy flow and information transfer of ecosystems by destroying the soil habitats and vegetation conditions, and will affect the structure and diversity of soil fauna from the bottom up.