Chemodynamic therapy (CDT), which uses metal ions to covert endogenous hydrogen peroxide into highly reactive hydroxyl radicals, is an newly-developing strategy for cancer therapy. However, poor drug delivery efficiency and restricted catalytic performance hinder the therapeutic potential of CDT. Herein, we constructed an in situ injectable hydrogel incorporating Fe/Mn-polydopamine nanoparticles and the ferroptosis inducer piperazine erastin (PE) (FMPEG) for mediating tumor-specific magnetic resonance imaging-visualized photothermal therapy (PTT)/CDT. Upon exposure to near-infrared light irradiation, FMPEG treatment exerted a PTT effect, which further accelerated the drug release behavior from FMP nanoparticles in response to the acidic tumor microenvironment. The released metal ions and PE enhanced the CDT effect at the tumor site. Furthermore, a long-term antitumor effect was obtained via the immunostimulatory effect of CDT/PTT by producing tumor-associated antigens. These findings, along with the unique advantages of injectable hydrogels in immune activation, prove the great potential of FMPEG administration as an efficient strategy for the clinical prevention of distant tumor metastasis of breast cancer.