Following pathogen attack to a host, widespread changes happen in the host genes expression such as those involved in immune system, growth and host survival. Epigenetic mechanisms have been suggested to be involved in regulating of these changes by a number of factors. DNA methylation is one of the important epigenetic factors which is done by DNA (cytosine-5) methyltransferase (Dnmt) and alters expression of target genes. To identify and characterize putative Dnmt gene candidates in Helicoverpa armigera, we considered mRNAs from whole transcriptome sequences and ESTs extracted from NCBI as well. By Blast search, we identified two putative sequences of Dnmt (i.e. Dnmt1 and Dnmt2) from the transcriptome dataset of H. armigera which showed highly similarity to the homologous sequences in Bombyx mori (75% for Dnmt1 and 70% for Dnmt2). Domain architectures of Dnmt1 and Dnmt2 exhibited the unique pattern of Dnmts that highlight conserved function of these genes in different insects. To see if these genes have any role in bacterial infection, we challenged the fifth instar larvae of the cotton bollworm by injecting Bacillus thuringiensis and Serratia marcescens cells into the hemolymph while the control larvae were injected with ds water instead. Total RNA was extracted from the treated and the control larvae at different times post injection; cDNA was synthesized using RT-PCR and oligodT primer. Transcript levels of the target genes were analyzed by RT-qPCR utilizing 18S rRNA as reference. The results showed that expression levels of Dnmt1 and Dnmt2 were increased in the bacterial-injected larvae while there was no change in the expression levels of the control larvae. To test whether these genes function during bacterial infection, the expression level of Dnmt1 and Dnmt2 were induced by RNA activation (RNAa) using specific dsRNAs targeting promoter of the genes. Twenty-four hours post activation of the genes, the bacterial cells were injected into the larvae while and mortality was compared with the bacterial-injected larvae with normal Dnmts expression levels. We found that induction of Dnmts expression increased mortality of the bacterial-injected larvae regardless of the bacterial species. Interestingly, bacterial replication in the larvae with enhanced Dnmts expression was higher than that of the larvae with the normal Dnmts expression levels. In conclusion, bacterial infection alters H. armigera methylation by induction of Dnmts expression levels in H. armigera thereby enhances their replication.