We report a new strategy, namely solvent-assisted curing, for developing a porous network into polymeric materials. A simple thermal process for nonporous melamine formaldehyde polymers in aprotic solvents affords porous characteristics with an exceptionally high surface area, resulting from the swelling and exclusion of a part of the polymeric structure aided by the solvent. The porous properties can be determined by selecting solvents and the monomer ratio that affects the degree of crosslinking. Furthermore, by tailoring the shape of precursor materials, we prepared the porous polymer in a variety of forms, such as particles and a monolith. The resulting material was exploited for CO2 adsorption and proved to be a potential gas sorbent. This versatile approach can be combined with other polymeric materials and provides an approach toward expanding the range of porous materials.