Aiming to investigate the impact of different stocking densities on the ability of Pacific white shrimp (Litopenaeus vannamei) to utilize Chlorella sorokiniana (CHL), a 3 × 2 factorial design stocking experiment was used in this study. Specifically, shrimp was fed with two dietary protein sources (fishmeal [FM] and CHL) at low (LSD; 100 per m3), medium (MSD; 200 per m3) and high (HSD; 300 per m3) stocking densities for 8 weeks. The growth performance and resistance to Vibrio parahaemolyticus (1.0 × 107 CFU/mL) of shrimp decreased with the increase of stocking density, but dietary CHL improved this result. Differences between the CHL and FM groups for V. parahaemolyticus resistance were significant only under high-density conditions (P < 0.05). Significant interactions between stocking density and protein source were found on the activities of catalase (CAT), superoxide dismutase (SOD) and phenol oxidase (PO), and the contents of malondialdehyde (MDA) in the hepatopancreas and the activities of intestinal amylase, most of which were significantly different between CHL and FM groups only at high stocking density (P < 0.05). Analysis of 16S rDNA sequencing showed that dietary CHL increased the alpha diversity of intestinal microbiota, inhibited the colonization of pathogenic bacteria and enhanced the abundance of beneficial bacteria. Transcriptomic results showed that at high stocking densities, differentially expressed genes (DEGs) in the FM vs CHL group were mostly upregulated and primarily enriched in immune and metabolic related pathways including Toll, immune deficiency (Imd) and glycolysis–gluconeogenesis pathways. Pearson correlation analysis revealed significant correlation between the top ten intestinal bacteria at the genus level and markedly enriched DEGs, also more were detected under high density situations. In conclusion, CHL has great potential as a novel protein source in the intensive farming of shrimp.