To explore the relationship between the intestinal flora of Exopalaemon Carinicauda and infection by Enterocytozoo Hepatopenaei (EHP), we analyzed the species and richness of gut microbiota in infected individuals in different EHP load groups [i.e., control (C), high load (H), and low load (L)] using gene sequencing after infection. The results showed that the abundance of intestinal flora in the high-load EHP group was significantly lower than that in the healthy group. Based on the UPGMA cluster tree and PCoA analysis, with comparisons to healthy shrimp, the gut microbiota of the EHP high load and low load groups were clustered into one branch, which indicated that EHP infection changed the composition of the gut microbiota of infected shrimps. The heat map analysis of species abundance clustering revealed that the dominant bacteria in the low EHP load group and the control group were beneficial genera such as Lactococcus, Ligilactobacillius, and Bifidobacterium, but the dominant bacteria in the high EHP load group were harmful genera such as Pseudomonas, Photobacterium, and Candidatus hepatincola. The functions of the intestinal flora predicted that most genes related to metabolism were more abundant in healthy shrimp, most genes related to metabolism and the organisms’ system were more abundant in the low EHP load group, and most genes related to diseases and environmental information processing were more abundant in the high EHP load group. After separation and purification, the dominant bacteria (Bifidobacterium animalis in healthy shrimp and Lactococcus garvieae in the low EHP load group) and the non-dominant bacteria (Macrococus caseolyticus in the low EHP load group) were obtained. Each of these isolated strains were used together with EHP to infect E. carinicauda, and the results showed that Bifidobacterium animali and Lactococcus garvieae significantly reduced the EHP load in EHP-infected individuals. At the same time, the morphology and structure of the hepatopancreas and intestinal tissue of EHP-infected E. carinicauda were improved. No improvement was seen in tissue that was infected with Macrococus caseolyticus.