A novel idea to prepare Polymethacrylimide (PMI) foam is presented in this paper, in which PMI foam was prepared by two steps, the butyl methacrylate (BMA)/methacrylamide (MAM) copolymer was formed using solution polymerization through free radical copolymerization, and then PMI foam was produced through the BMA/MAM copolymer foaming. Mechanism of polymerization reactions was analyzed. The BMA/MAM copolymer and PMI foam were investigated by Fourier transform infrared spectroscopy. It showed disappearance of the primary amide and appearance of the formation of PMI foam, which was in accordance with the mechanism of polymerization reactions. The polarizing micrograph showed PMI foam was highly transparent and closed cell. Differential scanning calorimetry and thermogravimetric analysis results showed PMI foam had excellent thermal stability below ~255°C because of the presence of the imide ring.