Plant–microbe interactions can impact plant growth and performance, and contribute to local adaptation. However, few studies have explored the impact of microbial communities from distinct native locations on plant functional traits, and less is known about how host-microbe interactions affect the quantitative genetics of plant traits. We used a recombinant inbred line (RIL) mapping population derived from upland and lowland ecotypes of the diploid C4 perennial bunch grass Panicum hallii to explore quantitative genetic responses to soil microbiomes. We show that the growth and development of ecotypes and their trait divergence depends on soil microbiomes. Moreover, we find that broad-sense H2 is modified by soil microbiomes, revealing important plant genotype-by-microbiome interactions for quantitative traits. We detected a number of quantitative trait loci (QTL) that interact with the soil microbiome. Our results highlight the importance of microbial interactions in ecotypic divergence and trait genetic architecture in C4 perennial grasses.