In situ neutron diffraction measurements of nanocrystalline titanium oxynitrides were performed, as a function of temperature and time, to explore the nitrogen/oxygen substitution mechanism occurring during their synthesis by reaction of gaseous ammonia with nanocrystalline Ti(OH)(4). These neutron diffraction experiments are supported by chemical analysis and X-ray diffraction, allowing the description of the structural variations and ordering process between the Ti(O/N)(2) anatase and the Ti(O/N) rock-salt phases. Our results show that the formation of the Ti(O/N) rock-salt phase goes along with the creation of vacancies on the Ti sites and that the N/O substitution proceeds but without N/O ordering.