Soil ectoenzyme activities (mainly carbon [C]-, nitrogen [N]- as well as phosphorus [P]-acquiring enzymes) and their ratios are the sensitive indicators for the nutrients and energy demands for microbes. How ectoenzyme stoichiometry ratios mediate the changes in microbial community composition and diversity following the conversion of cropland into grassland remains unknown. This study assessed the effects of soil abiotic, biotic factors, and ectoenzyme stoichiometry ratios on microbial diversity (using high-throughput sequencing) following the conversion of cropland into grassland (Cropland and 5, 10, 15, 25, and 30 year natural successional grasslands). Soil ectoenzyme activities synchronously increased with the increase of bacterial and fungal alpha diversity following the conversion of cropland into grassland. Moreover, biotic and abiotic factors co-explained microbial diversity by the changes of ectoenzyme stoichiometry ratios. Specially, ectoenzyme stoichiometry ratios were strongly related to the relative abundance of predominant fungal phylum (Ascomycota, Basidiomycota) and bacterial phylum (Acidobacteria), and ultimately leading to the microbial life history strategies transiting from the oligotrophic groups with retarded growth, to the copiotrophic groups with rapid growth. These differences of microbial community composition, driven by ectoenzyme stoichiometry ratios, reflect soil microbial nutrient cycling following the conversion of cropland into grassland.