Carbon dioxide (CO2) is generally unavoidable during the production of fuel gases such as hydrogen (H2) from steam reformation and syngas composed of carbon monoxide (CO) and hydrogen (H2). Efficient separation of CO2 from these gases is highly important to improve the energetic utilization efficiency and prevent poisoning during specific applications. Metal–organic frameworks (MOFs), featuring ordered porous frameworks, high surface areas and tunable pore structures, are emerging porous materials utilized as solid adsorbents for efficient CO2 capture and separation. Furthermore, the construction of hierarchical MOFs with micropores and mesopores could further promote the dynamic separation processes, accelerating the diffusion of gas flow and exposing more adsorptive pore surface. Herein, we report a simple, efficient, one-pot template-mediated strategy to fabricate a hierarchically porous CuBTC (CuBTC-Water, BTC = 1,3,5-benzenetricarboxylate) for CO2 separation, which demonstrates abundant mesopores and the superb dynamic separation ability of CO2/N2. Therefore, CuBTC-Water demonstrated a CO2 uptake of 180.529 cm3 g−1 at 273 K and 1 bar, and 94.147 cm3 g−1 at 298 K and 1 bar, with selectivity for CO2/N2 mixtures as high as 56.547 at 273 K, much higher than microporous CuBTC. This work opens up a novel avenue to facilely fabricate hierarchically porous MOFs through one-pot synthesis for efficient dynamic CO2 separation.