The suitability of monolithic polyimide aerogels as filter media for removal of airborne nanoparticles was investigated in this work by considering two solvents, N-methylpyrrolidone (NMP) and dimethylformamide (DMF) for tuning of meso- and macropore content. Polyimide gels were synthesized from the chemical reactions between solutions of pyromellitic dianhydride, 2,2'-dimethylbenzidine, and 1, 3, 5-triaminophenoxylbenzene. The gels were dried via supercritical drying in CO to obtain the aerogels. The porosity of polyimide aerogels was varied by changing the initial concentration of the solids in the solutions in the range of 2.5-10 wt %. The resulting aerogels show high porosity (91-98%), high specific surface area (473-953 m/g), low bulk density (0.025-0.12 g/cm), and solvent dependent macro- and mesopore content. The monoliths with bulk density of >0.05 g/cm produced high values of nanoparticle filtration efficiency (>99.95%) with air permeability of the order of 10 m. A strong proportional relationship was observed between the macropore content and air permeability and between the mesopore content and high filtration efficiency. Specimens prepared in DMF and NMP offered the same level of filtration efficiency, but the former provided a factor of 2 higher air permeability due to much greater proportion of macropores.