In shrimp, the Kazal-type serine proteinase inhibitors (KPIs) are involved in host innate immune defense system against pathogenic microorganisms. A five-Kazal-domain SPIPm2 is the most abundant KPIs in the black tiger shrimp Penaeus monodon and up-regulated in response to yellow head virus (YHV) infection. In this study, the role of SPIPm2 in YHV infection was investigated. The expression of SPIPm2 in hemocytes, gill and heart from 48-h YHV-infected shrimp was increased. The expression of SPIPm2 in hemocytes was significantly increased after 12h of infection and gradually increased higher afterwards. Silencing of SPIPm2 by dsRNA interference resulted in the increased expression of different apoptosis-related genes, the increased expression of transcriptional factors of antimicrobial synthesis pathways, the reduction of circulating hemocytes in the shrimp hemolymph, and the increased susceptibility of the silenced shrimp to YHV infection. The activities of caspase-3 and caspase-7 in the hemocytes of SPIPm2-silenced shrimp was also increased by 5.32-fold as compared with those of the control shrimp. The results suggested that the SPIPm2 was involved in the hemocyte homeostasis.