Accumulation of nitrite in water is highly toxic to aquatic animals. To understand immune responses in shrimp under such environmental stress, a digital gene expression (DGE) technology was applied to detect the gene expression profile of the Litopenaeus vannamei hemocytes in response to nitrite for 48 h. A total of 1922 differently expressed unigenes were generated. Of these transcripts, 1269 and 653 genes were up- or down-regulated respectively. Functional categorization and pathways of the differentially expressed genes revealed that immune defense, xenobiotics biodegradation and metabolism, amino acid and nucleobase metabolic process, apoptosis were the differentially regulated processes occurring during nitrite stress. We selected 19 differential expression transcripts (DETs) to validate the sequencing results by real time quantitative PCR (qPCR). The Pearson's correlation coefficient (R) of the 19 DETs was 0.843, which confirmed the consistency and accuracy between these two approaches. Subsequently, we screened 10 genes to examine the changes in the time course of gene expression in more detail. The results indicated that expressions of ATP-binding cassette transporter (ABC transporter), caspase10, QM protein, C type lectin 4 (CTL4), protein disulfide isomerase (PDI), serine protease inhibitor 8 (SPI8), transglutaminase (TGase), chitinase1, inhibitors of apoptosis proteins (IAP) and cytochrome P450 enzyme (CYP450) were induced to participate in the anti-stress defense against nitrite. These results will provide a reference for follow-up study of molecular toxicology and valuable gene information for better understanding of immune response in L. vannamei under environmental stress.