The in-situ thermal etching effect during metalorganic chemical vapor deposition of InGaN/GaN and GaN/AlGaN quantum Reil (QW) structures has been studied. The InGaN and the GaN were seriously etched by thermal decomposition in the InGaN/GaN and the GaN/AlGaN quantum well structures. The transmission electron microscope image showed that the InGaN/GaN QW layers were thermally etched as the substrate temperature was increased after QW growth. Also, the GaN/AlGaN emission peak was blue-shifted with increasing growth interruption time at the heterointerfaces, which was related to the thermal etching effect.