Diet can affect health directly or by altering the gut microbiota; thus, there are strong interrelationships between the gut immune system, gut microbiota and diet. This study examined the effects of ingesting AIN-93M purified diet (PD) on gut immune function and gut microbiota in DO11·10 mice, in which T cell–dependent and T cell–independent (TI) IgA can be analysed separately. Ingestion of the PD for 2 weeks reduced both T cell–dependent and TI secretory IgA in the faeces compared with non-PD, whereas the diet did not affect T cell–dependent and TI serum IgA. Ingestion of the PD had no effect on systemic immune system splenocyte responses. Ingestion of the PD reduced intestinal tissue expression levels of B-cell activating factor and A proliferation–inducing ligand, cytokines involved in TI-IgA production and polymeric Ig receptor, which transports IgA into the intestinal lumen. Co-abundance group (CAG) analysis of the intestinal microbiota was conducted based on correlations between changes in the abundance of bacterial genera, and the correlations between CAG and IgA were determined. The Allobaculum-dominated CAG expanded following ingestion of the PD, accompanied by an inverse correlation with the decrease in faecal IgA, whereas the Lactobacillus-dominated CAG shrank relative to the Allobaculum-dominated CAG. These results suggest that TI-IgA suppresses the expansion of some intestinal bacteria and that ingestion of the PD induces dysbiosis via impaired IgA secretion into the intestinal lumen.