This paper selects a building group in an urban area as a blueprint, and puts forward the optimized design scheme for the thermal environment of the building group in the urban area according to the climatic and geographic conditions of the urban area. The program mainly focuses on the three aspects of planning design, building design, and the structure of the external enclosure to carry out the optimization design. APMV, indoor temperature and indoor humidity are set as the evaluation indexes of thermal environment optimization, and the simulation analysis software is determined to explore the effect of thermal environment optimization design of building groups. When the building direction changes from 12°, the indoor temperature and APMV of the building gradually increase, and the values of temperature and APMV reach the maximum at 36° (36° south-east of the building), but the average indoor humidity of the building varies from 36% to 48% during the whole process of change. The minimum change in indoor humidity occurs when the body shape coefficient is increased from 0.782 to 0.784, and the average radiant humidity reaches its maximum when the body shape coefficient is increased to 0.788, and the indoor humidity shows a monotonically increasing trend with the body shape coefficient, while the indoor temperature is the same. The total number of hours in which the natural temperature of all rooms is below 26°C throughout the year decreases by 53,929h, which is a large change of 14.04%, indicating that the practical effect of the optimal design of the thermal environment of the building complex in this paper is particularly prominent.