Environmental stress can disrupt the intestinal microbiota of aquatic animals, thereby impacting their health status. In this study, we aimed to elucidate the dynamic changes in the bacterial community within shrimp intestines under short-term ammonia nitrogen stress and investigate the subsequent ecological risks associated with it. Our findings revealed a significant reduction in the Chao1 diversity index within shrimp intestines of the ammonia nitrogen stress group compared to the Control group. Furthermore, distinct disparities in the bacterial community structures were observed between the two groups at 72 h and 120 h post-stress. Additionally, ammonia nitrogen stress significantly altered the abundances of specific bacterial taxa within shrimp intestines. Specifically, the abundance of Bacillus subtilis increased while that of Lactococcus garvieae decreased in the intestine under stress at 72 h. Additionally, Roseivivax jejudonensis exhibited an increase, whereas uncultured_o_Saccharimonadales and Hyphomicrobium sp. showed a decrease at 120 h. Notably, opportunistic pathogens such as Vibrio parahaemolyticus experienced a significant increase at 72 h post-stress, potentially due to a substantial contribution from stochastic processes in shaping the assembly of the intestinal community. Additionally, the intestinal bacterial community of shrimp displayed a noticeable decrease in complexity of bacterial co-association networks under stress conditions. Thus, short-term exposure to ammonia nitrogen disrupts the integrity of shrimp's intestinal community, indicating potential ecological risks within their microhabitat. Confirmatively, we conducted the immersion challenge experiment of V. parahaemolyticus on shrimp post community disturbance under stress, and observed a significantly higher copy numbers of V. parahaemolyticus in host intestines of stressed compared to control shrimp. These findings can provide novel insights into the interactions among ammonia nitrogen stress, intestinal microbiota and host health of aquatic animals, and guide the practices for shrimp healthy culture.