Shrimp innate immunity is the first line of resistance against pathogenic bacteria. The Toll-like receptor (TLR)-NF-κB pathway is vital in this immunity process. In this study, a novel Spätzle gene (LvSpz4) of Litopenaeus vannamei was cloned and functionally characterized. The open reading frame of LvSpz4 was 918 bp, which encoded a putative protein with 305 amino acids. LvSpz4 was most expressed in the gills of L. vannamei. This expression was induced by Vibrio alginolyticus or Staphylococcus aureus infection or lipopolysaccharide stimulation. The reporter gene assay showed that LvSpz4 could activate the promoters of Pen4, Drs, AttA, Mtk, and white spot syndrome virus immediate early gene1 in Drosophila Schneider 2 (S2) cells. Knockdown LvSpz4 increased the cumulative mortality of L. vannamei upon V. alginolyticus infection. The unfolded protein response (UPR) induced the expression of LvSpz4 in L. vannamei. Moreover, the promoter of LvSpz4 was activated by L. vannamei X-Box binding protein 1 and activating transcription factor 4 in S2 cells. These results suggested that LvSpz4 was involved in L. vannamei innate immunity and caused the crosstalk between the TLR-NF-κB pathway and UPR.