The sustained casing pressure (SCP) phenomenon of shale gas and oil wells occurs frequently after fracturing; therefore, in order to assess the cement sheath’s integrity in the vertical well portion, the cement stones were subjected to a compression test under different temperatures and confining pressures to obtain the mechanical parameters of the cement sheath at different well depths. The integrity of the cement ring between the production casing and the intermediate casing was then investigated using the Moore–Coulomb criterion. We also took into account other elements including pump pressure, production casing wall thickness, and cement ring mechanical properties. The results show that (1) the compressive strength, Poisson’s ratio, and Young’s modulus of cement stone vary obviously under different confining pressures and temperature conditions, and the cement stone shows elastic–brittle failure characteristics at 20 °C. The compressive strength, Poisson’s ratio, and Young’s modulus increase with the confining pressure, but the Young’s modulus and compressive strength gradually decrease with the increase in temperature, while the stress–strain curves show obvious plastic failure characteristics at 80 °C and 130 °C. (2) The tangential tensile stress decreases and depth increases from the wellhead to the intermediate casing shoe, while the radial compressive stress of the cement sheath increases. The stress state of the cement sheath changes abruptly at the position of the casing shoe due to the change in casing layers, and under the intermediate casing shoe, the tangential tensile stress changes from tension to compression. When a conventional cementing slurry system is used, the integrity of the cement sheath above the intermediate casing shoe will fail during fracturing. (3) Reducing the pump pressure and increasing casing wall thickness can reduce the tangential and radial stresses of the cement sheath, but the integrity of cement sheath cannot be fully guaranteed. For the cement sheath’s sealing integrity, it is advantageous to decrease the Young’s modulus and raise its strength.