The copolymers of maleic anhydride (MA) are frequently used as a reactive polymer in the preparation of functional polymers in which the active agents consisting of amino or hydroxy groups can be linked to them via ring opening reactions. In the present paper, allylpropionate-altmaleic anhydride (MA-AP) copolymer was modified by hexamethylenediamine (HMDA) to obtain poly(maleamidic acid-allylpropionate) copolymer (MAA-AP) opening the maleic anhydride ring in the MA-AP copolymer. Next, maleimide-allylpropionate (MI-AP) copolymer was obtained by heating MAA-AP copolymer. The MA-AP, MAA-AP and MI-AP copolymers were characterised by Fourier transform infrared spectroscopy (FTIR). The thermogravimetry (TG) and differential scanning calorimetry (DSC) techniques were used for the thermal characterisation of all the polymers. In conclusion, much more thermally stable copolymers have been obtained due to replacement of maleimide and maleamidic acid groups instead of anhydride units.