Insects have been identified as an economically sustainable high-value, and safe protein-rich alternative to fishmeal in compound feeds for farmed fish. Accordingly, the present study aimed to evaluate the effects of substitution of fishmeal with insect meal from Hermetia illucens in the diet of rainbow trout (Oncorhynchus mykiss), on fish growth performance, and gut microbiota composition. For this purpose, three diets, with increasing levels of insect prepupae meal inclusion (10%, 20% and 30%) in partial substitution of fishmeal and a control diet without insect meal were tested in a 12-weeks feeding trial. Fish growth and feed conversion ratio were evaluated. The Illumina MiSeq platform for high-throughput amplicon sequencing of 16S rRNA gene and QIIME pipeline were used to analyse and characterize the whole microbiome associated to aquafeeds, and fish gut. The number of reads taxonomically classified according to the Greengenes database was 1,140,534. We identified 450 OTUs at 97% identity in trout fecal samples; 62 OTUs constituted the core gut microbiota. Actinobacteria, Firmicutes and Proteobacteria represented the dominant phyla in both experimental groups. Among them, the abundance of Actinobacteria and Proteobacteria was significantly influenced by including insect meal in the diet. In summary, our findings clearly indicated that insect meal positively modifies fish gut microbiota, increasing its richness and diversity and in particular, increasing the amount of beneficial lactic acid-and butyrate-producing bacteria, which contribute to the global health of the host. In addition, based on our present and previous studies, we believe that the prebiotic effect of insect meal is principally due to fermentable chitin.