An anti-contamination agent (Zn/Al–ATMP–LDH) has been synthesized by intercalation and used to correct the abnormal thickening and related operational risks caused by contact contamination between drilling fluids and cement slurries during high-temperature/high-pressure cementing. Experimental results have shown that the agent is chemically stable and exhibits good compatibility with conventional spacer-fluid additives. When compared with the direct addition of amino tris(methylenephosphonic acid) (ATMP), confining ATMP within a layered double hydroxide (LDH) markedly mitigates the retarding effect. At a dosage exceeding 0.3 wt%, the compressive strength of cement stone increases from 0 to 32.84 MPa following curing at 90 °C for 1 day, and continues to develop steadily after 7 days. Following conditioning at 187 °C, 145 MPa and 120 min, the spacer system formulated using the proposed agent as the core component serves to enhance the rheology of the mixed slurry via synergistic adsorption-regulation-dispersion stabilization-controlled release. The mixed slurry maintains stable rheological properties before and after aging with no uncontrolled thickening. When mixing the cement slurry and drilling fluid at a 7:3 volume ratio, the slurry consistency exceeds 60 Bc within 1 h, failing to meet operational requirements. In contrast, the mixed slurry containing the anti-contamination spacer (cement slurry:drilling fluid:spacer = 7:2:1) exhibits a thickening time greater than 300 min, and has been successfully applied in field cementing operations in a well in the Gaomo area.