Earthworms are known for their important role in soil ecosystem functioning and are used as indicators of ecosystem health. Earthworms and soil microorganisms are major players in soil ecosystem processes. However, understanding of their interactions is limited. Using microcosms, we studied the effect of earthworms on soil microorganisms in entire soil mesocosms by comparing soil with and without earthworms. Soil microbial activity was determined by an extracellular enzyme activity assay, while soil DNA was used to determine prokaryote abundance by quantitative PCR targeting 16S rRNA genes and community composition and diversity by amplicon sequencing of 16S rRNA genes. The microbial activity showed an indication of increase of chitinase, α-glucosidase, β-glucosidase and endo-β-glucanase during incubation with a specific increase in endo-β-glucanase activity in the presence of earthworms. Importantly earthworms decreased species richness (p = 0.002) and were a significant factor (p = 0.008) in shaping soil prokaryotes community structure. Moreover, our results revealed enrichment of bacterial phyla of Bacteroidetes and Proteobacteria, as well as reduction in relative abundance of the archaeal phylum Thaumarchaeota, suggesting that the presence of earthworms favors specific microbes in soil. Further, differential abundance analysis showed strong correlations between enzymatic activities (all tested except phosphomonoesterase) and relative abundances of specific bacterial OTUs. Our findings suggest that earthworms influence the soil microbial communities and their activity in soil, and hence earthworm-prokaryote interactions should be incorporated in future soil microbiome studies.