The interactions between the host immune system and intestinal microorganisms have been studied in many animals, including fish. However, a detailed analysis has not been performed in medaka, an established fish model for biological studies. Here, we investigated the effect of immunodeficiency on the microbiota composition and the effect of gut bacteria on intestinal epithelial development and immune responses in medaka. Chronological analysis of the intestinal microbiota of interleukin 2 receptor subunit gamma (il2rg) mutant medaka showed a gradual decrease in the evenness of operational taxonomic units, mainly caused by the increased abundance of the Aeromonadaceae family. Exposure of wild-type medaka to high doses of an intestine-derived opportunistic bacterium of the Aeromonadaceae family induced an inflammatory response, suggesting a harmful effect on adult il2rg mutants. In addition, we established germ-free conditions in larval medaka and observed large absorptive vacuoles in intestinal epithelial cells, indicating a block in epithelial maturation. Transcriptome analysis revealed a decrease in the expression of genes involved in the defense response, including the antimicrobial peptide gene hepcidin, whose expression is induced by lipopolysaccharide stimulation in normal larvae. These results show that reciprocal interactions between the microbiome and the intestinal tract are required for the maturation of the medaka immune system.