A low carbon yield is a major limitation for the use of cellulose-based filaments as carbon fiber precursors. The present study aims to investigate the use of an abundant biopolymer chitosan as a natural charring agent particularly on enhancing the carbon yield of the cellulose-derived carbon fiber. The ionic liquid 1,5-diazabicyclo[4.3.0]non-5-enium acetate ([DBNH]OAc) was used for direct dissolution of cellulose and chitosan and to spin cellulose–chitosan composite fibers through a dry-jet wet spinning process (Ioncell). The homogenous distribution and tight packing of cellulose and chitosan revealed by X-ray scattering experiments enable a synergistic interaction between the two polymers during the pyrolysis reaction, resulting in a substantial increase of the carbon yield and preservation of mechanical properties of cellulose fiber compared to other cobiopolymers such as lignin and xylan.