In this study, Marsupeneaus japonicus microRNA-S5 (miR-S5) was found to be up-regulated 24 h post white spot syndrome virus (WSSV) or V. alginolyticus infection. The loss of function using an anti-microRNA oligonucleotide (AMO-miR-S5) showed that expression levels of multiple innate immune-related genes were affected. The expression of p53 and tumor necrosis factor-α (TNF-α) were significantly down-regulated, expression of myosin was significantly up-regulated. The miR-S5 knockdown delayed WSSV-induced death for 48 h, but the final mortality was not affected, while V. alginolyticus-induced mortality was increased by 30%. The effect of miR-S5 knockdown on phagocytosis and apoptosis rates showed that miR-S5 knock down significantly decreased phagocytosis rate of WSSV from 27.8% to 7.0%, and phagocytosis rate of V. alginolyticus from 27.2% to 21.4%, separately. WSSV-induced apoptosis decreased from 60.83% to 51.25%, but no effect on V. alginolyticus-induced apoptosis (43.72%–45.04%). We concluded that miR-S5 could be used by WSSV via regulating hemocyte phagocytosis and apoptosis processes, but helps to defend against bacterial infection by regulating the proPO system, superoxide dismutase activity and phagocytosis.