Determination of spatial genetic structure (SGS) in natural populations is important for both theoretical aspects of evolutionary genetics and their application in species conservation and ecological restoration. In this study, we examined genetic diversity within and among the natural populations of a cosmopolitan grass Phragmites australis (common reed) in the Yellow River Delta (YRD), China, where a mosaic of habitat patches varying in soil salinity was detected. We demonstrated that, despite their close geographic proximity, the common reed populations in the YRD significantly diverged at six microsatellite loci, exhibiting a strong association of genetic variation with habitat heterogeneity. Genetic distances among populations were best explained as a function of environmental difference, rather than geographical distance. Although the level of genetic divergence among populations was relatively low (F’ST = 0.073), weak but significant genetic differentiation, as well as the concordance between ecological and genetic landscapes, suggests spatial structuring of genotypes in relation to patchy habitats. These findings not only provided insights into the population dynamics of common reed in changing environments, but also demonstrated the feasibility of using habitat patches in a mosaic landscape as test systems to identify appropriate genetic sources for ecological restoration.