In order to improve the heat‐resistant property of polyurethane foams, a series of polyurethane‐imide foams (PUIFs) with different contents of the imide group were fabricated via the prepolymer foaming method. It was found that the PUIFs showed a closed cellular structure with almost circular cell shapes. With increasing content of imide groups, the cell wall thickness and apparent density of the foams gradually increased, and the cell size showed a trend of first increasing and then decreasing. All foams exhibited a multistage deformation response when subjected to compressive loading, and the compressive strength and modulus of the PUIFs were significantly improved by incorporation of the imide group, increasing by roughly 5500% and 6400% for the PUIF with 34.25 wt% imide groups, indicating the remarkable reinforcing effect of the imide group on the PUIF. TGA and dynamic mechanical analysis showed that with increase of the imide group content the thermal degradation temperatures, the char yield and the degradation activation energy for the PUIFs sharply increased, while the storage modulus (G′) and Tg were obviously improved, reaching 575 MPa and 283 °C respectively, much higher than that of most reported PU foams, indicating the remarkable enhancement of the thermal mechanical stability of the PUIF. The heat insulation of the PUI system was also enhanced by the incorporation of imide groups. Such PUIFs showed potential applications for use in high temperature environments. © 2018 Society of Chemical Industry