The effect of the local surface heating on the stability of the boundary layer of the contoured nozzle M6 has been studied numerically for the hypersonic wind tunnel Transit-M ITAM SB RAS. Boundary layer profiles on the nozzle surface are found by the numerical simulation. Disturbance stability in the boundary layer is calculated in the context of the linear stability theory. It is shown that the local heating results in the slow-down of Goertler vortices amplification and Mack first mode in respect to the basic case; the stronger the heating, the stronger the effect. The second mode stabilizes at the local surface heating up to the temperature approaching to the stagnation temperature and de-stabilizes at further temperature rise. The optimal temperature of the local surface heating has been determined for the contoured nozzle M6 to stabilize disturbances in the boundary layer.