A composition for forming a resist underlayer film having heat resistance, which is used for a lithography process of semiconductor device production. A resist underlayer film forming composition including a polymer having a unit structure of Formula (1):Preferably, both rings A and B are benzene rings, n1, n2, and n3 are 0, R4 and R6 are hydrogen atoms, or R5 is naphthyl. A method for producing a semiconductor device including: forming an underlayer film by use of the resist underlayer film forming composition onto a semiconductor substrate; forming a hard mask on the underlayer film; forming a resist film on the hard mask; forming a resist pattern by irradiation with light or an electron beam and development; etching the hard mask using the resist pattern; etching the underlayer film by use of the patterned hard mask; and processing the semiconductor substrate by use of the patterned underlayer film.