Acute hepatopancreatic necrosis disease (AHPND) is one of the most common and serious diseases in shrimp aquaculture. Relevant works have focused on the gut microbiota-disease relationship when serious AHPND occurs. In contrast, little is known about how the gut microbiota responds to pathogen infection over AHPND progression, whereas this knowledge is fundamental to uncover the etiology of AHPND. Here, we explored the temporal succession of shrimp gut microbiota during Vibrio anguillarum (a causal pathogen of AHPND) challenge. The successful infection of V. anguillarum was confirmed by linearly increased abundance of the pathogen in theshrimp gut over AHPND progression. V. anguillarum infection caused an irreversible disruption in the shrimp gut microbiota, of which infection and hours post infection (hpi) respectively constrained 6.2% and 10.2% of variation in the data. Furthermore, the predicted functional pathways involved in immunity and metabolism significantly decreased, while those facilitating infectious diseases significantly enriched in the infected shrimp. Intriguingly, after ruling out the effect of background changes in gut microbiota, we identified 20 infection-discriminatory taxa that could be served as independent variables for accurately (89.4%) diagnosing V. anguillarum infection, even at the early infection stage, i.e., 24 hpi. Using a consensus network, we identified several Vibrio and Pseudoalteromonas taxa that directly antagonized V. anguillarum, following the Darwin's niche theory. This is one of the few attempts to identify gut bioindicators for diagnosing pathogen infection. In addition, the antagonistic commensals of V. anguillarum might be the candidate probiotics for preventing AHPND.