Cobalt sulfides have attracted tremendous attention as promising anodes for lithium-and sodium-ion batteries. However, the delivery of a high capacity with good cycle life conferred by carbon-free cobalt sulfides is a still challenge. In this work, carbon-free CoSx hollow nanospheres have been prepared and investigated as an advanced anode material for both lithium- and sodium-ion batteries. The resultant material features a unique nano-architecture with hollow core and porous shell. Based on time-dependent experiments, an Ostwald ripening process is proposed to describe the formation of the hierarchical hollow structure. By virtue of its appealing structure and conversion electrochemical reaction mechanism, remarkable electrochemical performances (e.g., high Li/Na-storage capacity, excellent cycling stability, and good rate capability) are achieved when this material is utilized as the anode materials in rechargeable batteries. For instance, a high Li/Na-storage capacity (1012.1mAhg−1 and 572.0mAhg−1) can be delivered after 100 cycles at 500mAg−1, corresponding to satisfied capacity retentions, suggesting the great promise of this material for application in rechargeable batteries.