Not only the water quantity consumed but also the source of drinking water has been considered for their health benefits, but there is limited evidence. We aimed to determine whether the amount and type of drinking water affect physiological and biological functions, including brain function, by confirming how it affects gut microbiota which has an important regulatory role in host physiology. Three-week-old infant mice were subjected to 1) a water restriction experiment (control group,ad libitumconsumption of distilled water; dehydration group, time-limited access to distilled water [15 min/day]) and 2) different water source experiment (distilled water, purified water, spring water, and tap water groups). The gut microbiota and cognitive development were analyzed using the 16S ribosomal ribonucleic acid sequencing method and the Barnes maze, respectively. The relative abundance of Firmicutes and Bacteroidetes and the Firmicutes-to-Bacteroidetes ratio (F/B ratio) changed depending on age (juveniles vs. infants). Insufficient water intake reversed these developmental changes, showing that the relative abundances of Bacteroidetes and Firmicutes and the F/B ratio in dehydrated juvenile mice were similar to those in normal infant mice. Additionally, clustering analysis revealed no significant differences in the intestinal flora in the mice from the different drinking water sources; however, dehydration significantly altered the composition of the genera compared to the other water source groups wherein water was providedad libitum. Moreover, cognitive development was significantly disrupted by insufficient water intake, although the type of drinking water had no significant influence. Cognitive decline, measured by relative latency, was positively associated with the relative abundance of unclassified Erysipelotrichaceae that were in significantly high relative abundance in the dehydration group. These results suggest that the water quantity consumed, rather than the mineral content of drinking water, is imperative for shaping the early gut microbiota associated with cognitive development during infancy.