Persistent heat, heavy rainfall, intense thunderstorms. Frequent extreme weather events have made the preservation of ancient buildings increasingly difficult. Therefore, this paper explores the preservation and value of ancient buildings, which is useful in helping insurance companies and property owners make decisions. First, in order to quantitatively analyze how much measures community leaders should take to protect buildings in their communities, this paper defines the maximum degree of measures as the cost of protection of the building, and assigns weights to the three indicators of human, material, and financial resources using the entropy weighting method and the coefficient of variation method. Secondly, the cost rate is multiplied by the gross product of the region, which is the maximum cost spent on the protection of the building. Finally, this paper chooses Dunhuang Mogao Grottoes as a historical landmark and uses the building cost protection model to evaluate the value of this historical landmark, and the results show that Dunhuang Mogao Grottoes is valued at about 3.393 billion yuan.