Chronic exposure of ammonia in fish can affect the activities of antioxidant enzymes but few studies investigate the influence of ammonia exposure on the expression of immune-related and antioxidant enzymes-related genes. Also, there is no study demonstrates the effect of ammonia exposure on gut microbial community of fish. In this study, crucian carp (Carassius auratus) were exposed to the ammonia concentrations, 0 (control), 10 mg L−1 (low) or 50 mg L−1 (high) for consecutive 30 days at 25 ± 1 °C temperature, respectively, and after that, the fish from all exposure groups were maintained in control conditions for another 15 days. The results showed that low concentration ammonia increased the expression of immune-related genes and antioxidant enzymes-related genes, but high concentration ammonia inhibited the expression of immune-related genes and antioxidant enzymes-related genes. After a 15-day treatment without ammonia, the expression of antioxidant enzymes-related genes and immune-related genes showed no significant changes compared with control. The results of high-throughput sequencing showed that gut microbial communities were significantly differentiated following ammonia exposure. The abundance of Bacteroides and Cetobacterium (two kinds of potential probiotics) increased while fish exposed to 10 mg L−1 ammonia. The Flavobacterium (a potential fish pathogen) showed increasing trends when the exposure dose reached 50 mg L−1, while the Bacteroides and Cetobacterium showed almost no abundance. The results also revealed that ammonia exposure concentration or time can alter the intestinal microbial community. In conclusion, ammonia exposure could induce the immune response in crucian carp, and alter the gut microbial community. The results may help us understand the correlations of gut microbial community shift and ammonia exposure and extend our knowledge to comprehend the effects of environmental factors on intestinal microbial community.