Sulfur-containing carbon nanofibers with the graphene layers approximately vertical to the fiber axis were prepared by a simple reaction between thiophene and sulfur at 550 °C in stainless steel autoclaves without using any templates. The formation mechanism was discussed briefly, and the potential application as anode material for lithium-ion batteries was tentatively investigated. The carbon nanofibers exhibit a stable reversible capacity of 676.8 mAh/g after cycling 50 times at 0.1 C, as well as the capacities of 623.5, 463.2, and 365.8 mAh/g at 0.1, 0.5, and 1.0 C, respectively. The excellent electrochemical performance could be attributed to the effect of sulfur. On one hand, sulfur could improve the reversible capacity of carbon materials due to its high theoretical capacity; on the other hand, sulfur could promote the formation of the unique carbon nanofibers with the graphene layers perpendicular to the axis direction, favorable to shortening the Li-ion diffusion path.