Porous carbon fiber with hollow structure and hydrophilic groups was successfully prepared from cotton. The structures and surface chemical properties of the porous carbon fiber were characterized by nitrogen adsorption isotherms, thermogravimetry, FTIR spectroscopy, and scanning electron microscopy. The morphologies of porous carbons prepared under different conditions were observed and compared. The resulting porous carbons had a microporous structure with a pore size distribution around 0.7–2.0 nm. The pyrolysis and decomposition of cotton to form a condensation cross-linked ring structure took place from 230 to 350 °C. Nitrogen-containing groups could be incorporated into the carbon matrix by urea decomposition during the carbonization process. The porous carbon contained more hydrophilic groups and its fiber structure was kept; the carbon yield was improved in the presence of KOH/urea. The porous carbon fiber showed high adsorption capacities of CO2 as a result of its surface hydrophilic groups and developed pore structure.