GaIn(N)As/GaAs and GaIn(N)As/GaNAs/GaAs quantum well (QW) samples, with and without GaNAs strain-compensating layers (SCLs), were grown on GaAs (001) substrates by molecular beam epitaxy. Photoluminescence (PL) was used to study the effects of the GaNAs SCL on the properties of the Ga(In)NAs QWs upon annealing. We observed that the insertion of GaNAs SCL produced a distinct increase in the PL blueshift as a function of annealing time. X-ray diffraction from the strain-compensated GaIn(N)As QWs before and after annealing showed no N atom diffusion, but exhibited Ga–In atom interdiffusion across the QW interfaces. We compared the effects of the GaNAs SCL on the PL blueshift with those of the SiO2 encapsulant upon annealing. The increased PL blueshift caused by the GaNAs SCL for tann≤40 s is attributed to the further GamIn4-m–N (0≤m≤4) changes due to greater local strain caused by GaNAs (SCL) quantum barriers as compared with GaAs barriers. For tann≫40 s, the nonsaturable blueshift caused by GaNAs SCL is attributed to defect-assisted (especially, Ga vacancies) Ga/In interdiffusion, since the density of Ga vacancy defects in the GaNAs SCLs is quite high.