Serine protease inhibitors (Serpins) are involved in diverse physiological and developmental processes, constituting one of the largest superfamilies of protease inhibitors. They are widely distributed across various organisms such as plants, animals, prokaryotes, and viruses. In insects, serpins exert their inhibitory effects on serine proteinase cascades, thereby regulating important pathways such as the Toll pathway and prophenoloxidase (proPO) in hemolymph. In this study, we cloned and analyzed the serpin-25 gene in Bombyx mori (Bmserpin-25). Bmserpin-25 mRNA was detected in all examined tissues, with high expression levels observed in the fat body, midgut, and epidermis. Upon injection of B. mori with four different microorganisms, including Gram-positive microbes (Micrococcus luteus), Gram-negative microbes (E. coli), fungi (Beauveria bassiana), and the B. mori nuclear polyhedrosis virus (BmNPV), the significant changes in Bmserpin-25 expression were observed specifically in response to E. coli and BmNPV treatments. Furthermore, the recombinant Bmserpin-25 was successfully expressed in Escherichia coli and purified for subsequent functional analysis. In vitro experiments showed that the recombinant Bmserpin-25 protein inhibited proPO activation but did not affect phenoloxidase activity. Additionally, injection of recombinant Bmserpin-25 protein into B. mori larvae resulted in a significant downregulation of antimicrobial peptide gene expression in the fat body. These findings emphasize the crucial role of serpin-25 in prophenoloxidase activation and the regulation of antimicrobial peptide gene expression in B. mori.