The geological environments of ultra deep wells such as high temperature and high pressure (HTHP), narrow safety density window pose significant challenges to cementing operation. Considering segmental rheological model and density model, casing eccentricity, U-tube effect and viscous dissipation, this paper established a transient temperature and pressure coupling model during cementing injection stage of ultra deep wells. The segmental rheological model can describe the rheological properties of cementing fluids under HTHP much better. Considering casing eccentricity and viscous dissipation can accurately model the variation of temperature and pressure profiles. Taking U-tube effect into the model, the formation process of vacuum section at top of the casing can be simulated. The fully implicit finite-difference approach was used to solve the coupling model, and the calculation results were compared with field measurement data and simulation data to verify its accuracy. The calculation errors of the developed model are respectively 10% and 5% compared to field measurement data and Wellplan’s simulation data. Numerical simulations were conducted to reveal the cementing fluid distribution, transient temperature distribution and pressure distribution during the cementing injection stage. The simulation results show that the variety of cementing fluids with different density, rheological properties and thermophysical parameters complicates the change mechanism of temperature and pressure. The temperature and pressure distributions both present unsteady characteristics during cementing injection stage, which puts forward higher requirements of pressure control for narrow safety density window formation. The influence of temperature and pressure on rheology of cementing fluids cannot be ignored, and segmental rheological model should be considered for accurate pressure prediction. Also the casing eccentricity cannot be ignored for cementing pressure calculation in deviated or horizontal wells. Managed pressure cementing (MPC) has a greater advantage in dealing with narrow density window formation. The synergistic control of cementing fluid density and back pressure can keep the equivalent circulating density (ECD) within the safe density window. Through the application of the transient temperature and pressure coupling model, we can simulate the variations of key dynamic parameters during cementing injection stage and optimize the cementing parameters.