We have studied the effects of growth temperature and subsequent thermal annealing on nitrogen incorporation into lattice-matched dilute Ga0.942In0.058NAs-on-GaAs epilayers, which were grown by the molecular-beam epitaxy method. The samples were studied experimentally by means of x-ray diffraction and Raman spectroscopy and theoretically by calculations within the density-functional theory. Over the entire range of growth temperatures applied (410–470 °C), nitrogen appeared to be mainly located on substitutional sites in “short-range-order clusters” as N–Ga4 and, to a lesser extent, as N–Ga3In. There were also indications of the presence of nitrogen dimers NN, as suggested by Raman spectroscopy, in qualitative agreement with the calculations. An increase in growth temperature reduced the amount of substitutional nitrogen and decreased the number of N–Ga4 clusters relative to N–Ga3In. Postgrowth thermal annealing promoted the formation of In–N bonds and caused a blueshift in the optical band gap, which increased as the growth temperature was lowered.