The disposal of organic waste by the biocomposting of black soldier fly larvae (BSFL) has drawn broad attention. However, the discrepancies in heavy metal immobilization between BSFL biocomposting with different inoculation densities and aerobic composting need to be further researched. In this study, BSFL with inoculation densities of 0.08%, 0.24% and 0.40% was added to swine manure to investigate its influence on heavy metal bioaccumulation and bioavailability. The physicochemical properties, BSFL growth performance and amino acid contents were measured. The results showed that the germination index, total prepupal yield and bioavailable fraction removal rate (%) of Cr and Pb at an inoculation density of 0.40% of BSFL were the highest among all of the BSFL biocomposting groups. Although the bioaccumulation factor and heavy metal (Cd, Cr, Cu and Zn) concentrations of the BSFL body from swine manure with inoculation densities of 0.24% and 0.40% of BSFL were similar, the BSFL inoculation density of 0.40% had the best absorption effect on these heavy metals in terms of total prepupal yield. Therefore, this study provides a basis for exploring the optimal inoculation density of BSFL biocomposting to reduce the harmful effects of heavy metals in swine manure.