The development of lightweight and highly heat-resistant polyimide foams (PIFs) remains a great challenge in areas of aerospace, military ships, transportation, and industries. Herein, a series of lightweight and highly thermal-resistant copolymerized PIFs are successfully fabricated by the "stepwise heating-holding" thermal foaming of the copolymerized polyester ammonium salts (C-PEAS), using 3,3 ',4,4 '-benzophenone tetracarboxylic acid dianhydride (BTDA) and 2,3,3 ',4 '-biphenyl tetracarboxylic acid dianhydride (alpha-BPDA) as codianhydride, and p-phenylenediamine (PDA) as diamine. The introduction of alpha-BPDA increases the rigidity of PI molecule chains and foamability of C-PEAS, and significantly improves the heat resistance of PIFs. The resultant copolymerized PIFs exhibit ultra-low densities (<10 kg m(-3)), excellent heat resistance (T-g ranging from 351.2 degrees C to 405.6 degrees C), and high thermal stability. Moreover, they possess high flame retardancies (LOI>44 %) and low thermal conductivities (as low as 0.0463 W m(-1) K-1 at 20 degrees C and no more than 0.0825 W m(-1) K-1 at 200 degrees C), demonstrating their excellent thermal insulation properties in a wide temperature range. After the continuous heating at 200 degrees C for 40 min, the upper surface of PIFs present low average temperatures less than 60 degrees C. Additionally, the copolymerized PIFs exhibit remarkable acoustic properties with average acoustic absorption coefficients above 0.6 and noise reduction coefficients (NRC) above 0.3. Therefore, the lightweight and highly heat-resistant copolymerized PIFs show great application potentials in the extreme environments of aerospace, military ships, transportation, and industries.