The production of the black soldier fly (BSF), Hermetia illucens L. (Diptera: Stratiomyidae), has potential to promote sustainable food production, and is environmentally friendly through organic waste upcycling. The objective of this study was to determine the digestive enzyme activities and chemical composition of BSF larvae of 6, 12, and 18 days old at various substrate pH and temperature conditions during ontogenic development. Cellulase and chymotrypsin‐like protease (C) activities declined slightly with age, whereas a sharp increase in lipase activity was found with age. High levels of amylase, trypsin‐like protease (T), trehalase, and T/C ratio were present in 12‐day‐old BSF, with a gradual decrease in 18‐day‐old BSF. The highest crude protein and lipid levels were observed at 6 and 18 days of age, respectively. In conclusion, the activities of the various types of enzymes illustrate the polyphagous nature of BSF. Most of the digestive enzymes had high activity at an early age and then dropped at the end of the larval stage; however, the opposite trend was observed in lipase activity, with a high level of fat accumulation in the last stage of larval development.