Cracking and repair of cementitious materials has always been a pressing problem in the engineering community. This study aims to improve the self-healing properties of cracked cementitious materials and optimize their compressive strength through the combined action of magnesium oxide expansion agents (MEA) and superabsorbent polymers (SAP). Indicators of self-healing include water permeability, chloride ion penetration resistance, and the degree of crack closure. The mineralogy of the self-healing products was analyzed using microstructural testing. The results show that while the incorporation of MEA slightly decreased the compressive strength of the specimens, a suitable amount of SAP contributed to an increase in compressive strength. The inclusion of SAP in cement samples with MEA significantly reduced water permeability in cracked specimens and improved their resistance to chloride ion penetration, thus extending the service life of cement-based structures. Microscopic testing indicates that while self-healing products of cracked specimens exhibit slight differences when healed in water compared to chloride ion solutions, the synergistic interaction between SAP and the hydration products of MEA consistently enhances the crack self-healing capabilities. The outcomes of this research provide a promising avenue for enhancing the durability of cementitious materials and advance the field of sustainable construction materials practices.