MicroRNAs (miRNAs) are increasingly recognized for their role in infection by bacterial pathogens, although the effect of each individual miRNA remains largely unknown. Here, we used a comparative genome-wide microscopy-based functional screening approach to identify miRNAs controlling infection by two bacterial pathogens—Salmonellaenterica serovar Typhimurium and Shigella flexneri. Despite the similarities between these pathogens, we found infections to be controlled by largely non-overlapping subsets of miRNAs, seemingly reflecting different requirements prompted by their distinct intracellular lifestyles. By characterizing a small subset of miRNAs chosen among the strongest inhibitors of Shigella infection, we discovered that miR-3668, miR-4732-5p and miR-6073 exert a selective effect on Shigella infection by impairing bacterial actin-based motility by downregulating N-WASP. Additionally, by identifying let-7i-3p miRNA as a strong inhibitor of Salmonella replication and performing in-depth analysis of its mechanisms of action, we showed that this miRNA specifically inhibits Salmonella infection via modulation of endolysosomal trafficking and the vacuolar environment by targeting the host RGS2 protein. These findings illustrate two paradigms underlying miRNA-mediated regulation of bacterial infection, acting as part of the host response to infection, or as part of bacterial strategies to modulate the host environment and favour pathogenesis.