Single-walled carbon nanotubes and chitosan composite yarn is prepared using a wet-spinning method. After thermal treatment, mesoporous all-carbon yarn is obtained. Based on this material, flexible all-solid-state yarn micro-supercapacitors are fabricated. Electrochemical results show high specific capacitance and energy density, good rate capability and stable cycling life. Results of this research offer prospect for application in portable and wearable electronics.