We studied the relationship between genetic diversity of the subterranean Gansu zokor Myospalax cansus and habitat variability in the Loess Plateau, Qinghai Province, China. We used a combination of geographic information systems and molecular techniques to assess the impact of habitat composition and human activities on the genetic diversity of zokor populations in this semi-natural landscape. Although they occurred relatively infrequently in the landscape, woodland and high-coverage grassland habitats were the main positive contributors to the genetic diversity of zokor populations. Rural residential land, plain agricultural land and low-coverage grassland had a negative effect on genetic diversity. Hilly agricultural land and middle-coverage grassland had little impact on zokor genetic diversity. There were also interactions between some habitat types, that is, habitat types with relatively better quality together promoted conservation of genetic diversity, while the interaction between (among) bad habitat types made situations worse. Finally, habitat diversity, measured as patch richness and Shannon's diversity index, was positively correlated with the genetic diversity. These results demonstrated that: (1) different habitat types had different effects on the genetic diversity of zokor populations and (2) habitat quality and habitat heterogeneity were important in maintaining genetic diversity. Habitat composition was closely related to land use thus emphasizing the importance of human activities on the genetic diversity of subterranean rodent populations in this semi-natural landscape. Although the Gansu zokor was considered to be a pest species in the Loess Plateau, our study provides insights for the management and conservation of other subterranean rodent species.