A genome-wide analysis of innate immunity-related genes and gene families was conducted using the silkworm, Bombyx mori. We identified orthologs for a large number of genes involved in insect immunity that have been reported from Drosophila melanogaster (Diptera), Anopheles gambiae (Diptera), Apis mellifera (Hymenoptera) and Tribolium castaneum (Coleoptera). B. mori has a unique recognition gene and antimicrobial peptide genes that are not present in the Drosophila, Anopheles, Apis and Tribolium genomes, suggesting a lineage-specific gene evolution for lepidopteran insects. The comparative analysis of the insect immune repertoires indicated a dynamic and flexible gene expansion in recognition, modulation and effector mechanisms due to different selection pressures. Differential gene regulation by different bacterial species was found in PGRP and Serpin genes, suggesting that Bombyx has a highly selective gene regulation system depending on bacterial species.