A method for manufacturing a semiconductor device, the method comprising: a sealing composition application process of applying a sealing composition for a semiconductor to at least a bottom face and a side face of a recess portion of a semiconductor substrate, to form a sealing layer for a semiconductor on at least the bottom face and the side face of the recess portion, the sealing composition for a semiconductor including a polymer having a cationic functional group and a weight average molecular weight of from 2,000 to 1,000,000, each of the content of sodium and the content of potassium in the sealing composition for a semiconductor being 10 ppb by mass or less on an elemental basis, and the semiconductor substrate being provided with an interlayer insulating layer having the recess portion and a copper-containing wiring of which at least a part of a surface thereof is exposed on at least a part of the bottom face of the recess portion; and a removal process of subjecting a surface of the semiconductor substrate at a side at which the sealing layer for a semiconductor has been formed to heat treatment under a temperature condition of from 200°C to 425°C, to remove at least a part of the sealing layer for a semiconductor that has been formed on an exposed face of the copper-containing wiring, wherein the weight average molecular weight of the polymer having a cationic group is a polyethylene glycol-equivalent weight average molecular weight as measured by Gel Permeation Chromatography method, the interlayer insulating layer is a porous interlayer insulating layer, the sealing composition comprises 0.01% by mass to 1.0% by mass of the polymer having a cationic functional group, as well as a solvent, the cationic functional group in the polymer is at least one selected from the group consisting of a primary amino group and a secondary amino group, the removal process results in preferential removal of the sealing layer formed on the exposed face of the copper-containing wiring in the bottom face of the recess portion, as compared to the sealing layer formed at portions other than the exposed face, and the sealing layer remains at portions other than the exposed face of the copper-containing wiring in the bottom face of the recess portion after the removal process. a sealing composition application process of applying a sealing composition for a semiconductor to at least a bottom face and a side face of a recess portion of a semiconductor substrate, to form a sealing layer for a semiconductor on at least the bottom face and the side face of the recess portion, the sealing composition for a semiconductor including a polymer having a cationic functional group and a weight average molecular weight of from 2,000 to 1,000,000, each of the content of sodium and the content of potassium in the sealing composition for a semiconductor being 10 ppb by mass or less on an elemental basis, and the semiconductor substrate being provided with an interlayer insulating layer having the recess portion and a copper-containing wiring of which at least a part of a surface thereof is exposed on at least a part of the bottom face of the recess portion; and a removal process of subjecting a surface of the semiconductor substrate at a side at which the sealing layer for a semiconductor has been formed to heat treatment under a temperature condition of from 200°C to 425°C, to remove at least a part of the sealing layer for a semiconductor that has been formed on an exposed face of the copper-containing wiring, wherein the weight average molecular weight of the polymer having a cationic group is a polyethylene glycol-equivalent weight average molecular weight as measured by Gel Permeation Chromatography method, the interlayer insulating layer is a porous interlayer insulating layer, the sealing composition comprises 0.01% by mass to 1.0% by mass of the polymer having a cationic functional group, as well as a solvent, the cationic functional group in the polymer is at least one selected from the group consisting of a primary amino group and a secondary amino group, the removal process results in preferential removal of the sealing layer formed on the exposed face of the copper-containing wiring in the bottom face of the recess portion, as compared to the sealing layer formed at portions other than the exposed face, and the sealing layer remains at portions other than the exposed face of the copper-containing wiring in the bottom face of the recess portion after the removal process.