At high temperatures, the salt resistance of fluid loss agents is poor. In order to achieve the goal of high temperature salt resistance, a zwitterionic fluid loss agent was designed and synthesized.Using sodium p-styrene sulfonate, itaconic acid, acrylamide, and dimethyldiallylammonium chloride as raw materials, a water loss agent SMFD was synthesized through aqueous solution polymerization. The structural characterization of the polymer showed that the molecule contains the designed functional groups, has a moderate molecular weight, and can withstand heat at temperatures above 220 ℃. The microstructure of the polymer solution exhibits a three-dimensional network structure. At 150 ℃, the water loss of 4% fluid loss additive is less than 50mL, and it still performs well in semi saturated saline and saturated saline environments. Additionally, the impact of the fluid loss additive on the strength, rheological properties, settlement stability, and other relevant characteristics of the cement slurry is minimal, thereby satisfying the necessary criteria for successful well cementing. The utilisation of microscopy, scanning electron microscopy, and organic carbon adsorption testing techniques revealed that the application of SMFD enhances the characteristics of cement filter cakes. This improvement is attributed to the formation of a polymer network through processes such as ion association, adsorption, and polymer synergy. The polymer network effectively fills the voids between cement particles, resulting in a more compact filter cake structure. Consequently, this leads to a reduction in water loss of the cement slurry.