Energy management is one of the most important issues to be addressed in the near future in many fields, one of which is buildings. In this sense, new phase change materials (PCM) are being widely studied for storing energy. Encapsulating PCM is a good way to incorporate these materials into different applications in which energy storage is useful. In this study, microcapsules based on ZnO containing n-octadecane as a phase change material were synthesized and characterized with regard to their structural, morphological and optical properties according to several synthesis parameters, such as the proportion of precursors, stirring rate and ageing time. The microcapsules were characterized using x-ray diffraction, Fourier transform infrared spectroscopy, scanning electron microscopy, and UV–Vis spectroscopy in diffuse reflectance mode. The presence of n-octadecane inside the capsules was confirmed. Their thermal behaviour was analysed by means of differential scanning calorimetry. Heating/cooling cycles were performed, after which the microcapsules presented good stability. Furthermore, the encapsulation efficiency was estimated from melting and crystallization enthalpy values, reaching a value of 23.1%. Moreover, the isobaric specific heat of the microcapsules is higher than that of ZnO, which means that substituting ZnO with microcapsules in buildings leads to an important increase in the amount of sensible heat stored. Finally, the photocatalytic activity of the microcapsules was analysed by studying the photodegradation of Crystal Violet dye. The degradation rate increased when the microcapsules were present, so the photocatalytic activity of the microcapsules was confirmed under UV and visible irradiation, which is of interest because they can be used to remove organic pollutants from buildings.