Abstract The saprophagous larvae of Hermetia illucens show promising potential as effective agents for bioconverting organic waste and by-products into valuable biomass. Their capability to efficiently transform organic substrates, varying in nutrient content, origin, texture, and moisture, is strictly correlated with the morphofunctional complexity of their digestive system and the associated microbiota. In addition, post-ingestion mechanisms are set in motion to regulate the midgut activity depending on the feeding substrate, thus ensuring the nutritional requirements of the larvae. This study aims to assess the capability of H. illucens larvae to grow and biotransform the organic fraction of municipal solid waste (OFMSW). In particular, the larvae were reared on substrates mimicking the OFMSW with different nutrient content, and their growth and bioconversion performance, as well as the quality of larval and pupal biomass were evaluated. Our results demonstrate that the nutritional composition of the rearing substrates had minimal impact on the efficiency of the bioconversion process and on the protein, lipid, and chitin content of the insect biomass. This was due to a fine transcriptional regulation of genes encoding enzymes involved in protein, polysaccharide, and lipid digestion in midgut cells. As a consequence, larvae reared on OFMSW with the lowest protein, starch, and lipid content exhibited a significant increase in protease, amylase, and lipase activities. Overall, this study highlights the value of H. illucens larvae in valorising the OFMSW, demonstrating that variations in its composition do not significantly affect the quality of the bioconversion process. These findings hold significant practical implications as current strategies for OFMSW treatment remain unsatisfactory and innovative approaches are needed to enhance bio-waste recycling and reduce the environmental impact of waste management.