Among other species, Black Soldier Fly (Hermetia illucens, HI, Diptera, Stratiomydae) has the great potential as food and feed ingredient in the EU, particularly thanks to its preference for organic waste as growth substrate. The production of insects as livestock feed or as food ingredient requires a strict monitoring of heavy metal content in the growth substrate in order to secure its safe. This study aims to investigate the presence of toxic metals cadmium, lead, mercury, arsenic, and nickel in HI prepupae and their growth substrates based on coffee roasting by-product and microlagae Schizochytrium sp. and Isochrysis sp. Analyses were carried out via graphite furnace atomic absorption spectrophotometry for Cd, Pb, Ni, and As, and via Direct Mercury Analyzer for Hg. All metal concentrations found in growth substrates were below the legal limit of undesirable substances in animal feed (2002/32/EC). Metals concentrations in HI prepupae were in the range (mg kg-1 wet weight): Cd 0.072–0.084, Pb 0.018–0.026, Hg 0.010–0.032, As 0.036–0.047, Ni 0.18–0.76. HI prepupae accumulate Cd, Pb and Hg, but our results indicate that the risk of exposure to metals from consumption of HI prepupae is relatively low and in compliance with European Union regulations.