Lysozymes act as crucial bacteriolytic enzymes in insect immune system by hydrolyzing the beta (1-->4) bonds between N-acetylglucosamine and N-acetylmuramic acid in the peptidoglycan of prokaryotic cell walls. We have isolated and characterized a Helicoverpa armigera cDNA encoding an insect lysozyme named HaLyz. We amplified a fragment by PCR, using degenerate primers derived from the conservative amino acid sequences for performing 5' and 3' RACE. The full-length cDNA was 661 base pairs. The theoretical pI and molecular weight of the protein were computed to be 9.08 and 15.6 kDa, respectively. Prokaryotic expression of the HaLyz ORF by Escherichia coli confirmed the calculated molecular weight of the protein. The deduced 135 amino acids showed high homology with known lysozymes from other insects, ranging from 47% to 89% by BLASTp search in NCBI. Analyses revealed that this protein has a typical lysozyme C signature among amino acids 93-111, CNVTCAEMLLDDITKASTC. An interesting relation between immunity and larva to pupa metamorphosis in insects was discovered. Real time-PCR showed that HaLyz gene expression was transiently enhanced at the onset of metamorphosis of the cotton bollworm, Helicoverpa armigera. The gene expression was up-regulated after the injection of E. coli or entomopathogenic fungi, Beauveria bassiana, but showed different expression patterns.