Litopenaeus vannamei (L. vannamei) is the most economically valuable cultured shrimp in the world, while Gram-negative bacteria infection causes huge economic losses to shrimp culture. In this study, we performed transcriptome sequencing of the hepatopancreas in L. vannamei after lipopolysaccharide (LPS, the cell wall component of Gram-negative bacteria) injection to investigate the response of shrimp under Gram-negative bacteria invasion. A total of 306 differentially expressed genes (DEGs) (70 up- and 236 down-regulated) were identified in the LPS treatment group (L group) when compared to their expression levels in the control group (C group). The oxidoreductase activity (GO:0016491) in the molecular function category was enriched in the LPS-responsive DEGs in GO annotation, and the metabolism of xenobiotics by cytochrome P450 (ko00980) was the most enriched pathway in KEGG annotation. The transcriptome profiling revealed that the toll like receptor, C-type lectin receptor, and β-1,3-glucan binding protein were involved in the recognition of LPS during its early invasion stage. Although LPS could reduce the metabolic ability of exogenous substances, induce inflammation and reduce antioxidant capacity, L. vannamei could maintain its homeostasis by improving immunity, enhancing anti-stress ability and reducing apoptosis. Our research provides the first transcriptome profiling for the L. vannamei hepatopancreas after LPS injection. These results could offer a valuable reference on the mechanism of shrimp against Gram-negative bacteria and could provide guidance for shrimp farming.