The effects of biotic and abiotic factors on insect life histories have been extensively studied. However, the impact of some crucial aspects, such as larval density (crowding) and the effects of environmental interactions, have often been overlooked. This study aims to determine the effects of larval density and temperature on life-history traits in the black soldier fly (BSF). Our results showed an increase in prepupal mass, pupal mass, prepupal-to-pupal mass loss, survival, prepupal fat content, adult mass, adult longevity and a reduction in larval and pupal development time at low densities. Larval density was maintained throughout the entire larval period and larval survival was determined at the 4th instar and at prepupation. Larvae were reared at three different larval densities (1, 5 and 10 larvae/cm2), at three temperature treatments (23, 27 and 30 °C) and food was provided ad libitum. High densities, on the contrary, resulted in an increase in development time, mortality and a decrease in prepupal mass loss. Temperature significantly affected all studied traits except survival, prepupal fat content and adult longevity, and notably modified the larval density effects on prepupal mass, pupal mass, adult mass, prepupal-to-pupal mass loss, prepupal fat content, duration of larval period, and adult longevity. Males and females differed in all studied life-history traits except adult mass. We conclude that density and temperature and their interaction-related effects during larval development considerably affect BSF larval life-history traits. Therefore, these effects should be carefully considered when planning for insect mass rearing.