In this study, highly cross-linked and completely imidized polyimide aerogels were prepared from polyimide containing trimethoxysilane side groups, which was obtained as the condensation product of polyimide containing acid chloride side groups and 3-aminopropyltrimethoxysilane. After adding water and acid catalyst, the trimethoxysilane side groups hydrolyzed and condensed one another, and a continuous increase in the complex viscosities of the polyimide solutions with time was observed. The formed polyimide gels were dried by freeze-drying from tert-butyl alcohol to obtain polyimide aerogels, which consisted of a three-dimensional network of polyimide fibers tangled together. By varying the solution concentration of the polyimide containing trimethoxysilane side groups, polyimide aerogels with different densities (ranging from 0.19 to 0.42 g/cm(3)) were obtained. The resulting polyimide aerogels had small pore diameter (ranging from 20.7 to 58.3 nm), high surface area (ranging from 310 to 344 m(2)/g), high 5% weight loss temperature in air (at about 440 °C), and an excellent mechanical property. In addition, the glass transition temperature (349 °C) of the polyimide aerogels was much higher than that (210 °C) of the corresponding linear polyimide. So, even after being heated at 300 °C for 30 min, the porous structure of the polyimide aerogels was not completely destroyed.