The shell of Hermetia illucens L. contains considerable amounts of chitin, which has various biological activities. So far, few studies have focused on chitin of Hermetia illucens L. as a source of chitosan and oligosaccharides. There is great potential for utilizing Hermetia illucens L. chitin to produce chitosan films in biomaterials. We studied different extraction conditions for chitin and extracted it from black soldier fly (BSF) (Hermetia illucens L.). Three processing steps were adopted: (1) demineralization, (2) deproteinization, and (3) decolorization. The chemical components (moisture, ash, protein, fat, residual protein, and residual mineral contents) and physicochemical characteristics of the chitin and chitosan extracted under these three conditions were determined. In addition, Fourier transform infrared spectroscopy and X-ray diffraction were used to analyze the extracted chitin and commercial samples, and the results showed that demineralization–deproteinization–decolorization treatments could achieve the highest chitin yield (7.18 ± 0.11 %), chitosan yield (64.22 ± 0.79 %), and the best purity (residual protein 0.56 ± 0.01 % and residual ash 0.58 ± 0.04 %), making it the best treatment method. Using this method, the residues produced from farmed BSF can be recycled and used as a new source of chitin.