A method for obtaining thin vacuum deposited azopolyimide layers is established. On the basis of the thermogravimetric and differential thermal analyses, the chemical reaction in the solid state between the initial precursors - 4,4’-diaminoazobenzene and pyromellitic dianhydride is discussed. Also, the preparation parameters allowing for a condensation of films of desired composition are determined. Fourier Transform Infrared Spectroscopy analyses confirm that the azo group is chemically bound in a thin polyimide layer matrix. This is a solution to the task of preparing a “Main – Chain” type polyimide matrix with a chemically bound azo- group.