A method for manufacturing a semiconductor device comprising: a step of forming a trench in a surface of a semiconductor substrate of a first-conductivity-type in a depth direction; a step of forming a conductive layer in the trench, with a first insulating film interposed therebetween, so as to be buried in the entire trench; a step of dividing the conductive layer into a gate electrode and an in-trench wiring layer which face each other in the trench and filling a gap between the gate electrode and the in-trench wiring layer with a second insulating film; a step of introducing second-conductivity-type impurities into the entire surface of the semiconductor substrate to form a channel forming region of a second conductivity type; and a step of selectively forming a main electrode region of the first conductivity type in a portion of the channel forming region which is provided along the trench so as to come into contact with the trench; characterized in that: the step of introducing second-conductivity-type impurities and the step of selectively forming a main electrode region are performed after the step of forming the conductive layer and before the step of dividing the conductive layer; and the step of dividing the conductive layer is performed using a third insulating film, which is deposited on the surface of the semiconductor substrate and which has an opening portion formed in a stripe-shaped pattern similar to a stripe-shaped pattern of the trench, as an etching mask; and wherein the second insulating film is deposited directly on the third insulating film. a step of forming a trench in a surface of a semiconductor substrate of a first-conductivity-type in a depth direction; a step of forming a conductive layer in the trench, with a first insulating film interposed therebetween, so as to be buried in the entire trench; a step of dividing the conductive layer into a gate electrode and an in-trench wiring layer which face each other in the trench and filling a gap between the gate electrode and the in-trench wiring layer with a second insulating film; a step of introducing second-conductivity-type impurities into the entire surface of the semiconductor substrate to form a channel forming region of a second conductivity type; and a step of selectively forming a main electrode region of the first conductivity type in a portion of the channel forming region which is provided along the trench so as to come into contact with the trench; characterized in that: the step of introducing second-conductivity-type impurities and the step of selectively forming a main electrode region are performed after the step of forming the conductive layer and before the step of dividing the conductive layer; and the step of dividing the conductive layer is performed using a third insulating film, which is deposited on the surface of the semiconductor substrate and which has an opening portion formed in a stripe-shaped pattern similar to a stripe-shaped pattern of the trench, as an etching mask; the step of introducing second-conductivity-type impurities and the step of selectively forming a main electrode region are performed after the step of forming the conductive layer and before the step of dividing the conductive layer; and the step of dividing the conductive layer is performed using a third insulating film, which is deposited on the surface of the semiconductor substrate and which has an opening portion formed in a stripe-shaped pattern similar to a stripe-shaped pattern of the trench, as an etching mask;