Hierarchical zeolite composite nanofibers are designed using an electrospinning technique with post-carbonization processing to form mechanically strong pellets for biogas upgrading. A ZSM-5 nanopowder (zeolite) and a polyvinylpyrrolidone (PVP) polymer are electrospun to form ZSM/PVP composite nanofibers, which are transformed into a ZSM and carbon composite nanofiber (ZSM/C) by a two-step heat treatment. The ZSM/C nanofibers show a 30.4% increase in Brunauer-Emmett-Teller (BET) surface area compared with the non-structured ZSM-5 nanopowder. Using ideal adsorbed solution theory, CO2-over-CH4 selectivity of 20 and CO2 uptake of 2.15 mmolg(-1) at 293 K at 1 bar for ZSM/C nanofibers are obtained. For the efficient use of adsorbents in pressure swing adsorption operation, the nanofibers are structured into ZSM/C pellets that offer a maximum tensile strength of 6.46 MPa to withstand pressure swings. In the breakthrough tests, the CO2 uptake of the pellets reach 3.18 mmolg(-1) at 293 K at 4 bar after 5 breakthrough adsorption-desorption cycles, with a much higher mass transfer coefficient of 1.24 ms(-1) and CO2 uptake rate of 2.4 mg of CO2 g(-1)s(-1), as compared with other structured zeolite adsorbents.