Antimicrobial peptides (AMPs) and lysozymes are the main effectors of the insect immune system, and they are involved in both local and systemic responses. Among local responses, midgut immune reaction plays an important role in fighting pathogens that reach the insect body through the oral route, as do many microorganisms used in pest control. Under this point of view, understanding how insects defend themselves locally during the first phases of infections caused by food-borne pathogens is important to further improve microbial control strategies. In the present study, we analyzed the transcriptional response of AMPs and lysozymes in the midgut of Spodoptera exigua (Lepidoptera: Noctuidae), a polyphagous pest that is commonly controlled by products based on Bacillus thuringiensis (Bt) or baculovirus. First, we comprehensively characterized the transcripts encoding AMPs and lysozymes expressed in S. exigua larval midgut, identifying 35 transcripts that represent the S. exigua arsenal against microbial infection. Secondly, we analyzed their expression in the midgut after ingestion of sub-lethal doses of two different pore-forming B. thuringiensis toxins, Cry1Ca and Vip3Aa, and the S. exigua nucleopolyhedrovirus (SeMNPV). We observed that both Bt toxins triggered a similar, wide and in some cases high transcriptional activation of genes encoding AMPs and lysozymes, which was not reflected in the activation of the classical systemic immune-marker phenoloxidase in hemolymph. Baculovirus ingestion resulted in the opposed reaction: Almost all transcripts coding for AMPs and lysozymes were down-regulated or not induced 96 hours post infection. Our results shed light on midgut response to different virulence factors or pathogens used nowadays as microbial control agents and point out the importance of the midgut immune response contribution to the larval immunity.