STAT, a transcription factor in the JAK/STAT signaling pathway, regulates immune response to pathogens. In the silkworm (Bombyx mori), STAT exists as two split-forms, STAT-S and STAT-L. However, the role of STAT in silkworm immunity remains unclear. Our purpose was to investigate the effect of STAT on the expression of antimicrobial peptide (AMP) genes and resistance against pathogens. The expression levels of STAT-S and STAT-L were significantly up-regulated after induction by pathogenic microorganisms. In BmE cells, lipopolysaccharide (LPS), peptidoglycan (PGN) and β-glucan stimulated STAT-S and STAT-L to transfer from the cytoplasm to the nucleus. We found that overexpression of STAT-S and STAT-L in cells could promote the expression of AMPs. We generated transgenic silkworm lines overexpressing STAT-L or STAT-S (OE-STAT-S; OE-STAT-L) or interfering with STAT (A4-dsSTAT). Overexpression of STAT-S and STAT-L upregulated the expression of AMP genes in the OE-STAT-S and OE-STAT-L, increased the survival rates of the OE-STAT-S silkworms and lowered the mortality of OE-STAT-L silkworms infected with S. aureus or Beauveria bassiana. By contrast, the death rate of A4-dsSTAT silkworms was higher after infection with these pathogenic microorganisms. These findings may provide insights into the role of STAT in the antimicrobial immune response of silkworms.