Sodium fatty alcohol polyoxyethylene ether sulfate (AES), an anionic surfactant, which relieves the contamination of Portland cement slurry containing mineral oil based mud (MOBM) effectively. In this paper, by testing fluidity and compressive strength firstly in 25 °C and 90 °C after 1, 3, 7, 14 and 28 days of curing respectively, Vipulanandan rheological model was applied to analyze rheological behavior. We found AES could deteriorate cement’s fluidity and compressive strength as its content increasing. Additionally, cement stone would lose about 85% of compressive strength as low as 0.05%wt AES especially. We observed microstructure of cement containing AES by Environment Scanning Electron Microscope (ESEM), which proved that AES causes cement surface to form holes, and the reduction of cement hydration products was confirmed by X-ray diffraction (XRD). Finally, by comprehensively analyzing combining Zeta Potential and Contact Angle, we used mathematical models to explain the mechanism of AES’s affecting on the structure and performance of cement: (1) In the slurry, AES deteriorates fluidity by trapping the free water. (2) AES attaches on cement particles surface, via affecting “Dynamic Potential” to decrease mutual repulsion between cement particles to accumulate them, resulting in uneven distribution of cement particles in the cement slurry with appearing holes and the dropping of density. (3) Foaming and its stability of AES makes structure of cement structure porous, forming entangled network structures and bounded air bubbles.