Spinal cord injury (SCI) represents a catastrophic neurological condition resulting in long-term loss of motor, autonomic, and sensory functions. Recently, ferroptosis, an iron-regulated form of cell death distinct from apoptosis, has emerged as a potential therapeutic target for SCI. In this study, we developed an injectable hydrogel composed of carboxymethyl cellulose (CMC), and quaternized chitosan (QCS), loaded with modified polydopamine nanoparticles (PDA NPs), referred to as CQP hydrogel. This hydrogel effectively scavenged reactive oxygen species (ROS), prevented the accumulation of Fe2+ and lipid peroxidation associated with ferroptosis, and restored mitochondrial functions in primary neuronal cells. When administered to animal models (rats) with SCI, the CQP hydrogels improved motor function by regulating iron homeostasis, inhibiting ferroptosis, and mitigating oxidative stress injury. Both in vitro and in vivo studies corroborated the capacity of CQP hydrogels to promote the shift from M1 to M2 polarization of microglia/macrophages. These findings suggest that CQP hydrogels, functioning as a localized iron-chelating system, have potential as biomaterials to enhance recovery from SCI by targeting ferroptosis and modulating anti-inflammatory macrophages activity.