Metal-organic frameworks (MOFs) have attracted attention for CO2 adsorption owing to their unique pore characteristics and facile functionalization. However, their powdery nature causes poor mechanical stability and low gas mass transfer efficiency, limiting their applications. Herein, we report a promising strategy of in situ assembly of amino-functionalized ZIF-8 (ZIF-8-NH2) on the surface of nanofibers to create the one-dimensional gas transport pathway while generating hierarchical porous architectures that increase the number of CO2-philic sites. Benefiting from the created microenvironments, the ZIF-8-NH2 fiber membranes (FMs) showed a high specific surface area of 248.29 m2/g, a high CO2 adsorption capacity of 3.25 mmol/g at 298 K and 1 bar, an excellent CO2/N2 selectivity of 37, and stable recyclability. Molecular dynamics simulations indicated that amination could enhance the CO2 affinity of ZIF-8-NH2 FMs. The gas dynamic breakthrough tests further demonstrated the high separation efficiency of the ZIF-8-NH2 FMs for the formation of CO2 and N2. The proposed collaborative regulation of microenvironments strategy provides a bright orientation for constructing functionalized MOF FMs for efficient CO2 adsorption.