a method for fabricating semiconductor device is disclosed . the method includes the steps of : providing a substrate having gate structure thereon , wherein the gate structure comprises a high - k dielectric layer ; increasing an ambient pressure around the gate structure to a predetermined pressure by injecting a first gas ; reducing the ambient pressure to a base pressure ; and forming a spacer around the gate structure .