SnO2 nanosheets were uniformly dispersed on sunflower seed shell based carbon microspheres by a simple one-step hydrothermal method, and the obtained composite was applied as a high-performance hard carbon anode material for lithium-ion and potassium-ion batteries. The introduction of sunflower seed shell based carbon spheres not only provides the support frame and growth site for SnO2 nanosheets, but also prevents the aggregation of flower-like structures to a certain extent. Moreover, the sunflower seed shell based carbon spheres have superior electrical properties. The results show that the composite can maintain 901.2 mAh g−1 after 400 cycles at 782 mA g−1, demonstrating stable reversible cycling under high current. The potassium ion battery show that the composite can maintain 201.9 mAh g−1 after 350 cycles at 374 mA g−1. This study provides a simple and convenient method for preparing prickly ball-like electrode materials, a promising anode material for potassium-ion batteries (PIBs) and lithium-ion batteries (LIBs).