The black soldier fly (BSF), Hermetia illucens L. (Diptera: Stratiomyidae), has a great bioconversion potential and ability to develop on diverse substrates. Although the use of catering waste and food by-products containing meat and fish would reduce the footprint of the insect sector, to date, in Europe, their use is still facing legal obstacles for insects as food and feed. Since a major request from the EU insect sector is to diversify the spectrum of allowed substrates, and considering that variations in diet composition could influence insect immune responses, we evaluated the impact of different catering wastes on BSF prepupae immunity. Insects were reared on five diets: one based on feed for laying hens and four based on catering waste containing (i) fruits and vegetables; (ii) fruits, vegetables and bread; (iii) fruit, vegetables, bread and dairy products; (iv) fruits, vegetables, bread, meat and fish. The gene expression of two antimicrobial peptides (AMPs), one defensin and one cecropin, was assessed. Moreover, the hemolymph inhibitory activity against Escherichia coli DH5α and Micrococcus yunnanensis HI55 was evaluated using diffusion assays in solid media. The up-regulation of both AMPs’ encoding genes was observed in insects fed a bread-added and dairy product-added diet. All hemolymph samples showed inhibitory activity against both bacteria, affecting the colony size and number. The obtained results show how catering waste positively influences the H. illucens immune system. The possibility of modulating AMP expression levels through the diet opens up new perspectives in the management of insect health in mass rearings.