Lots of beautiful wall paintings have been preserved in the Mogao Grottoes.With the passage of time,some kinds of deterioration have appeared in some caves,such as the disruption,flaking,and detachment.Many studies show that salt migration and enrichment are the causes of the deterioration in wall paintings,while moisture and temperature in the rock determine how the salt migrates.To find out the variation laws and the relationship between temperature and relative humidity in the rock,temperature and relative humidity equipment has been installed in the area where wall paintings have fallen off in Mogao Cave 108 for long-term monitoring.On the basis of collected data on temperature and relative humidity of the western wall in Mogao Cave 108,this paper presents a lateral and longitudinal comparison and comes to the conclusion that in the shallow area of the surrounding rock,as the temperature increases,the water vapor shows a downward trend.In the vertical and horizontal directions,the temperature takes on periodical changes.The relative humidity increases from inside toward the outside of the rock,and then remains stable at a certain depth.This paper presents a study of the influences of temperature on relative humidity and their correlation in the rocks inside the cave,which might be able to provide a scientific basis for determining the deterioration mechanism and the preventive measures for the wall paintings.