Azospirillum sp. B510, a free-living nitrogen-fixing bacterium isolated from the stems of rice (Oryza sativa cv. Nipponbare), was investigated to establish effective conditions for the colonization of rice plants. We analyzed the effects of the nitrogen sources KNO3, NH4Cl, urea (CO[NH2]2), and NH4NO3 at different concentrations (0.01–10 mM) on this colonization. Nitrogen promoted plant growth in a concentration-dependent manner, with minor differences being observed among the different nitrogen sources. Bacterial colonization was markedly suppressed on media containing NH4+ concentrations higher than 1 mM. Since concentrations of up to and including 10 mM NH4+ did not exhibit any antibacterial activity, we analyzed several factors affecting the NH4+-dependent inhibition of endophytic colonization, including the accumulation of the reactive oxygen species H2O2 and the secretion of the chemotactic substrate malic acid. The accumulation of H2O2 was increased in rice roots grown on 1 mM NH4Cl. The amounts of malic acid secreted from NH4-grown rice plants were lower than those secreted from plants grown without nitrogen or with KNO3. Although the bacterium exhibited chemotactic activity, moving towards root exudates from plants grown without nitrogen and KNO3-grown plants, this activity was not observed with root exudates from NH4+-grown plants. NH4+, but not NO3−, caused the acidification of growth media, which inhibited plant bacterial colonization. These NH4+-dependent phenomena were markedly suppressed by the stabilization of medium pH using a buffer. These results demonstrate that the type and concentration of nitrogen fertilizer affects the colonization of rice plants by Azospirillum sp. B510.