Although immunogenic cell death (ICD) inducers evidently enhance the effectiveness of immunotherapy, their potential is increasingly restricted by the development of apoptosis resistance in tumor cells, poor immunogenicity, and low T-cell immune responsiveness. In this study, for the first time, piezoelectrically catalyzed Mg2+-doped hydroxyapatite (Mg-HAP) nanoparticles, which are coated with a mesoporous silica layer and loaded with ONC201 as an agonist to specifically target the death receptor DR5 on tumor cells, ultimately developing an Mg-HAP@MS/ONC201 nanoparticle (MHMO NP) system, are engineered. Owing to its excellent piezoelectric properties, MHMO facilitates the release of a significant amount of reactive oxygen species and Ca2+ within tumor cells, effectively promoting the upregulation of DR5 expression and inducing tumor cell necroptosis to ultimately overcome apoptosis resistance. Concurrently, Mg2+ released in the tumor microenvironment promotes CD8+ T receptor activation in response to the antitumor immune reaction induced by ICD. Using RNA-seq analysis, it is elucidated that MHMO can activate the NF-κB pathway under piezoelectric catalysis, thus inducing M1-type macrophage polarization. In summary, a dual-targeting therapy system that targets both tumor cells and the tumor microenvironment under piezoelectric catalysis is designed. This system holds substantial potential for advancements in tumor immunotherapy.