Many recent studies have focused on the relationship between biodiversity and ecosystem functioning, such as investigations into the productivity of experimental plant communities. One of the central issues affecting the functioning of ecosystems is the diversity of resident species richness and the composition of the plant community. However, one challenge to experimental studies is that results from artificial ecosystems may have little value for predicting loss of diversity and function degradation in natural ecosystems. Thus, recent studies have focused more on investigations of natural ecosystems; these studies have found that species diversity and ecosystem productivity usually correlate with various abiotic factors including environmental effects, such as soil nutrition and precipitation, as well as anthropic activities, such as grazing and agricultural yield. In this study, we aimed to test the validity of biotic factors reported in experimental studies to be major factors affecting the productivity of ecosystems, and then to determine whether the relationship between biodiversity and ecosystem function is confounded by environmental factors. We investigated the effects of plant biodiversity and community composition on ecosystem function (productivity) in semiarid grassland in Inner Mongolia, China that contained three vegetation types: arid steppe, steppe, and meadow steppe. Our results show that both diversity and community composition significantly affect productivity and are better predictors of productivity than environmental factors, such as soil conditions. Our findings are consistent with the assumptions of niche complementarity. This study suggests that both biodiversity and community composition are important biotic factors in the functioning of ecosystems located in semiarid grasslands. In addition, environmental parameters, such as soil conditions influence productivity indirectly by affecting both biotic factors at the same time.