Nodulation of soybean (Glycine max) root hairs by the nitrogen-fixing symbiotic bacterium Bradyrhizobium japonicum is a complex process coordinated by the mutual exchange of diffusible signal molecules. A metabolomic study was performed to identify small molecules produced in roots and root hairs during the rhizobial infection process. Metabolites extracted from roots and root hairs mock inoculated or inoculated with B. japonicum were analyzed by gas chromatography-mass spectrometry and ultraperformance liquid chromatography-quadrupole time of flight-mass spectrometry. These combined approaches identified 2,610 metabolites in root hairs. Of these, 166 were significantly regulated in response to B. japonicum inoculation, including various (iso)flavonoids, amino acids, fatty acids, carboxylic acids, and various carbohydrates. Trehalose was among the most strongly induced metabolites produced following inoculation. Subsequent metabolomic analyses of root hairs inoculated with a B. japonicum mutant defective in the trehalose synthase, trehalose 6-phosphate synthase, and maltooligosyltrehalose synthase genes showed that the trehalose detected in the inoculated root hairs was primarily of bacterial origin. Since trehalose is generally considered an osmoprotectant, these data suggest that B. japonicum likely experiences osmotic stress during the infection process, either on the root hair surface or within the infection thread.