The largest part of the biodiversity of terrestrial ecosystems is in pastures and agricultural lands. In terms of biological importance, the Zagros mountain range has the richest and most diverse biodiversity, which faces the dangers of land use change and invasive species. Earthworms, soil ecosystem engineers, have been of great interest in soil physicochemical processes and evolutionary studies. Recent studies indicate the adverse effect of human activities and land use change on the diversity of earthworms. Since the identification of earthworms, using morphological methods is ambiguous; therefore, we need to use genetic methods and molecular markers to separate worms. In this study, we identified taxonomic functional units (OTUs) in earthworms using morphological information and molecular marker COI. Then, we have investigated the effect of agricultural uses on the genetic diversity of earthworms in Central Zagros, Borujerd County using multifactorial statistical analysis. We separated into 13 OTUs belonging to seven genera based on the results of the genealogical tree. The results of the comparison of wheat, alfalfa, sugar beet and clover pastures and farmlands showed that the OTUs of the farmlands all belong to the Lumbricidae family and the OTUs of the pastures, in addition to this family, were in the Megascolecida and Hormogastridae families. In total, we observed four genera of Helodrilus, Aporrectodea, Bimastos and Allolobophora in agricultural lands and six genera of Metaphire, Aporrectodea, Bimastos, Esenia, Allolobophora and Hormogaster in pastures. The results of the ranking analysis of the multifactorial analysis method in land use groups, soil physicochemical characteristics and indicators of abundance and biodiversity of earthworm OTUs with nine factors in 36 variables showed that OTUs C, H and I, all of Aporrectodea rosea species, are the most effective based on multi-factorial analysis in abundance and biodiversity. Biodiversity efficiency index of earthworms of grassland ecosystems was higher than agricultural ecosystems in all cases. Compared to other agricultural ecosystems (wheat, sugar beet and clover), alfalfa cultivation had the highest efficiency index in earthworm biodiversity and the lowest efficiency index was in wheat cultivation. Sugar beet and alfalfa croplands had more OTU diversity compared to clover and wheat croplands. The selection of alfalfa cultivation in crop rotation will increase the biodiversity of earthworms and the stability of agricultural ecosystems. Considering the importance of earthworms in providing ecosystem services and soil quality, it is necessary to conduct more research on the effect of common agricultural ecosystems on the biodiversity of earthworms.