The demand for practical and cost-effective environmental treatment and energy storage materials is exploding. Porous polymeric and carbonaceous materials have attracted tremendous interest on account of their welldeveloped porosity and tunable surface chemistry. Functionalization of pore structures further enhances their properties for environmental treatment and energy storage. Herein, the procedures for functionalization of porous structures are introduced, including predesign and postsynthetic strategies. Subsequently, the important advancements of emerging porous polymers for environmental treatment in sorption (e.g., organic micropollutant adsorption, heavy metal ion removal, radionuclide extraction, and oil absorption) and membrane separation (e.g., aqueous micropollutant separation, organic solvent nanofiltration, desalination and pervaporation), as well as for energy storage ranging from the electrodes and separators of batteries to supercapacitor electrodes are highlighted. Moreover, given the combined merits of high intrinsic conductivity, porosity, and physicochemical stability, novel polymer-based porous carbons for energy storage are also highlighted. Key functionalization chemistry for each application is discussed and an in-depth understanding of the structure-property relationships of these functional porous materials is provided. Finally, the challenges and perspectives of emerging functional porous polymeric and carbonaceous materials for environmental treatment and energy storage are proposed.