Advanced functional composite of ZnO nanoparticles embedded in N-doped nanoporous carbons has been synthesized by a simple one-step carbonization of zeolitic imidazolate framework-8 under a water stream atmosphere. A variety of characterization techniques show that the introduction of water steam during the carbonization process holds the key to obtain the fine and homogeneously dispersed ZnO nanoparticles within the functionalised nanoporous carbon matrix. Possessing a higher specific surface area, a larger pore volume and abundant oxygen-containing hydrophilic functional groups, the resulting composite exhibits a stronger interaction with CO 2 and is more efficient to promote the photocatalytic degradation-adsorption of methylene blue under visible light than the composite obtained without steam treatment. As a result, the steam derived composite exhibits increased CO 2 uptake capacity and excellent methylene blue molecules removal from water. Using different metal-organic frameworks as precursors, this new, simple and green method can be further expanded to generate various new homogeneous dispersed functional metal oxide/porous carbon composites with high efficient in relevant applications.