A method of producing a semiconductor device according to the present invention comprises steps of:(A) forming trenches (13) on the front surface (FS) of a semiconductor substrate (11) on the back surface (BS) of which a nitride film (12b) is formed;(B) depositing an insulating film (15) to bury the trenches (13);(C) removing the nitride film (12b) on the back surface (BS) of the semiconductor substrate (11) after the step (B); and(D) annealing before the insulating film (15) is etched after the step (C).