IntroductionUsing black soldier fly larvae (BSFLs) to treat food waste is one of the most promising environmental protection technologies.MethodsWe used high-throughput sequencing to study the effects of different nutritional compositions on the intestinal microbiota and digestive enzymes of BSF.ResultsCompared with standard feed (CK), high-protein feed (CAS), high-fat feed (OIL) and high-starch feed (STA) had different effects on the BSF intestinal microbiota. CAS significantly reduced the bacterial and fungal diversity in the BSF intestinal tract. At the genus level, CAS, OIL and STA decreased theEnterococcusabundance compared with CK, CAS increased theLysinibacillusabundance, and OIL increased theKlebsiella,AcinetobacterandBacillusabundances.Diutina,IssatchenkiaandCandidawere the dominant fungal genera in the BSFL gut. The relative abundance ofDiutinain the CAS group was the highest, and that ofIssatchenkiaandCandidain the OIL group increased, while STA decreased the abundance ofDiutinaand increased that ofIssatchenkia. The digestive enzyme activities differed among the four groups. The α-amylase, pepsin and lipase activities in the CK group were the highest, and those in the CAS group were the lowest or the second lowest. Correlation analysis of environmental factors showed a significant correlation between the intestinal microbiota composition and digestive enzyme activity, especially α-amylase activity, which was highly correlated with bacteria and fungi with high relative abundances. Moreover, the mortality rate of the CAS group was the highest, and that of the OIL group was the lowest.DiscussionIn summary, different nutritional compositions significantly affected the community structure of bacteria and fungi in the BSFL intestinal tract, affected digestive enzyme activity, and ultimately affected larval mortality. The high oil diet gave the best results in terms of growth, survival and intestinal microbiota diversity, although the digestive enzymes activities were not the highest.