Sulfide is a natural and widely distributed toxicant. It can be commonly found on the interface between water and sediment in the aquatic environment. The Pacific white shrimp Litopenaeus vannamei starts life in the benthic zone soon after the mysis stage, an early stage of post larvae. Therefore, L. vannamei is inevitably affected by exposure to sulfide released from pond sediment. This study explored the toxicant effect of different concentrations of sulfide on the intestinal health and microbiota of Pacific white shrimp by monitoring the change of expression of inflammatory, immune related cytokines, and the structure of the intestinal microbiota. The gut histology, expressions of inflammatory and immune related cytokines (tumor necrosis factor-alpha, C-type lectin 3, myostatin and heat shock transcription factor 1), and the microbiota were determined in L. vannamei after exposure to 0 (control), 425.5 (1/10 LC 50–96 h), and 851 μg/L (1/5 LC 50–96 h) of sulfide for 21 days. With the increase of sulfide concentration, intestinal injury was aggravated and the inflammatory and immune related cytokines generated a range of reactions. The expression of myostatin (MSTN) was significantly down-regulated by the concentration of sulfide exposure. No difference in the expression of heat shock transcription factor 1 (HSF1) was found between the control and shrimp exposed to 425.5 μg/L, but significantly higher HSF1 expression was found in shrimp exposed to 851 μg/L of sulfide. Significantly higher values of tumor necrosis factor-alpha (TNF-α) and C-type lectin 3 (CTL3) were found in the shrimp exposed to 425.5 μg/L of sulfide compared to the control, but a lower value was found in the shrimp exposed to 851 μg/L (P < 0.05). Sulfide also changed the intestinal microbial communities. The abundance of pathogenic bacteria, such as Cyanobacteria, Vibrio and Photobacterium, increased significantly with exposure to the increasing concentration of sulfide. The abundance of some anti-stress bacteria, such as Chlorobi and Fusobacterium, increased. Nitrospirae which can alleviate nitrite toxicity decreased. Microbacterium, Parachlamydia, and Shewanella were all commonly found and down-regulated in both sulfide groups, which is associated with an adaptation to sulfide stimulation. This study indicates that chronic exposure to sub-lethal levels of sulfide could lead to damage of the gut structure, stimulate the response of the inflammatory and immune systems, and shape the structure of the gut microbiota in L. vannamei.