The pulverized coal gasification was performed in a bench-scale membrane wall entrained-flow gasifier, and properties of coal ash and slag were analyzed. A three-dimensional mathematic model of the membrane wall was developed for the temperature and thermal stress analysis of the slag layer. The temperature and thermal stress of the slag layer were simulated, and the contribution of the phase change of slag during the cooling process was also investigated. The simulation results indicate that remarkable temperature gradients are observed in the slag layer and the temperature field is also influenced by the stud. The phase change of the molten slag significantly influences the stress distribution and variation during the cooling. The thermal stress mainly reveals to be compressive in the initial solid slag layer. Its value is larger in the region with a higher temperature, while the thermal stress acts as tension in the slag solidified, and a greater value is observed in the region with a lower temperature. Furthermore, the value of thermal stress decreases in the initial solid slag but increases in the slag solidified with the decreasing temperature during the cooling.