Metarhizium spp. have emerged as an alternative to chemical pesticides for protecting crops from insect pest. Here, we investigated midgut microbial community and metabolites of Spodoptera litura at three different timepoints after infection with Metarhizium flavoviride. The innate immune system of S. litura was activated with levels of polyphenol oxidase, carboxylesterase, multifunctional oxidase, and glutathione S-transferase activity significantly increasing. Exposure to the fungal pathogen also altered bacterial abundance and diversity in host's midgut, and these changes varied depending on the time elapsed since exposure. We identified more operational taxonomic units in the treated samples as compared to the control samples at all tested time points. A total of 372 metabolites were identified, and 88, 149, and 142 differentially accumulated metabolites (DAMs) were identified between the treatment and control groups at 3 timepoints after treatment, respectively. Based on the changes of DAMs in response to M. flavoviride infection at different timepoints and significantly enriched KEGG pathways, we speculated that "tyrosine metabolism," "galactose metabolism," "ATP-binding cassette transporters," "neuroactive ligand-receptor interaction," "purine metabolism," "arginine and proline metabolism," "beta-alanine metabolism," "lysosome," and "carbon metabolism" may participate in the metabolic-level defense response. An integrated pathway-level analysis of the 16S-rDNA and metabolomic data illustrated the connections and interdependencies between the metabolic responses of S. litura and the midgut microorganisms to M. flavoviride infection. This work emphasizes the value of integrated analyses of insect-pathogen interactions, provides a framework for future studies of critical microorganisms and metabolic determinants of these interactions, establishes a theoretical basis for the sustainable use of M. flavoviride.