Over the last decades, insect meal has received great attention for finfish diets, due to its nutritional composition and low ecological footprint. In the present study, four experimental diets were formulated in which black soldier fly (Hermetia illucens) meal (HI) was used to replace 0 (HI0), 25 (HI25), 35 (HI35) and 50 (HI50) percent of fish meal. The experimental diets were administered to gilthead seabream (Sparus aurata) in a 131-day feeding trial in an open recirculating system. At the end of the experiment a remarkable change in gut microbiota composition related to HI inclusion was observed, with a preponderance of Nitrospirota in HI0 and HI25 and of Chloroflexi in HI35 and HI50 groups. Predictive analysis on bacterial metabolic pathways showed a clear separation between HI0-HI25 and HI35-HI50 groups. The microbiota shifts observed suggest a pivotal role of HI in inducing a bacterial-mediated physiological response in this fish species, probably due to chitin content and the fatty acid profile of this ingredient. Liver histology showed a higher hepatocyte size in fish from HI50 group, while a marginal adaptive response was observed in HI25 group. Overall, 50% HI dietary inclusion is not recommended, since possible alteration in lipid deposition, particularly at hepatic level, were highlighted in this fish species.