To overcome obstacles hindering the commercialization of lithium-ion batteries (LIBs) and sodium-ion batteries (SIBs), we introduce a cost-effective single-step sulfurization strategy for synthesizing iron sulfide (Fe0.975S) nanohybrids, augmented by N,S codoped carbon. The resulting N,S codoped carbon-coated Fe0.975S (Fe0.975S@NSC) electrode exhibits exceptional potential as a highly reversible anode material for both LIBs and SIBs. With impressive initial discharge and charge capacities (1658.2 and 1254.9 mAh g–1 for LIBs and 1450.9 and 1077.1 mAh g–1 for SIBs), the electrode maintains substantial capacity retention (900 mA h g–1 after 1000 cycles for LIBs and 492.5 mA h g–1 after 600 cycles for SIBs at 1.0 A g–1). The LiMn2O4//Fe0.975S@NSC and Na3V2(PO4)3//Fe0.975S@NSC full batteries can maintain excellent reversible capacity and robust cycling stability. Ex situ and in situ X-ray diffraction, density functional theory (DFT) calculations, and kinetics analysis confirm the promising energy storage potential of the Fe0.975S@NSC composite.