Conductive and porous carbon plays critical roles as electrode material for electrochemical energy storage devices, including supercapacitors. Using commonly available biomass cellulous fibers as the raw material to produce porous carbon is a promising approach to achieve high-performance and low-cost electrodes. Herein, carbon microfiber (CMF) membranes were prepared via a direct carbonization method using cotton fiber meshes as precursors. The nitrogen doping content, carbon surface area and pore density could be well adjusted by the carbonization atmosphere and temperature. With CMF membranes as freestanding electrodes in supercapacitors, remarkable electrochemical performances were demonstrated. In particular, the CMF membrane obtained at 800 °C in ammonia (CMFs-800) can achieve a high capacitance of 172 F g-1 at the current density of 0.1 A g−1, meanwhile it shows excellent rate capability and superior cycling stability. This study indicates that the pyrolyzed cotton mesh, due to its large pore density, high specific surface area, and heteroatom doping, has potential to be used as cost-effective electrode for supercapacitors.