Aiming at regulating building temperature in summer, the preparation and optimization of TiO2@n-octadecane microcapsules were studied in this paper, which is significant to energy conservation. N-octadecane and TiO2 act as the core material and shell material, respectively. The SEM, FT-IR, DSC, TGA, and infrared thermal imaging were used to analyze the TiO2@n-octadecane microcapsules. Aiming at the enthalpy of phase transition and encapsulation rate of microcapsules, the reaction vessel, emulsifier, stirring rate, amount of acetic acid, and droplet-adding rate for preparing microcapsules were optimized. Furthermore, the microcapsules with the best properties were mixed into concrete to analyze their temperature regulation performance, mechanical strength, fire resistance, thermogravimetry, and cyclic stability. The effect of microcapsule proportions on the temperature regulation ability of concrete at different temperatures was also studied. The key findings are as follows: Firstly, the TiO2@n-octadecane microcapsules exhibit a stable core–shell structure and a size of about 1 μm. The highest melting enthalpy, crystallization enthalpy, and encapsulation rate of TiO2@n-octadecane microcapsules are 120 J/g, 116 J/g, and 54.1 %, respectively. The microcapsules only consist of TiO2 and n-octadecane without any chemical reactions. Secondly, the concrete incorporating the TiO2@n-octadecane microcapsules shows a faster phase change reaction, inhibiting temperature rise or fall effectively, and preventing leakage. Thirdly, compared with ordinary concrete, 5 mm concrete with 20 % TiO2@n-octadecane microcapsules can extend its temperature below 28.5 °C for 15.7, 14.0, and 7.6 min at 30 °C, 35 °C, and 40 °C, respectively. Finally, the compressive strength of concrete with 0 %∼20 % MPCMs satisfies the requirements for concrete applications. It also has excellent fire resistance and thermal stability. Moreover, incorporating MPCMs into concrete can significantly reduce the pyrolysis of MPCMs.