Integration of phase change materials (PCMs) into building materials has emerged as a promising approach for building energy-saving, yet suffers from the risks of liquid PCM leakage which corrodes the building substrate, leading to limited applications. Herein, this study developed a nanoscale SiO2-encapsulated n-octadecane (ODE) capsule via sol-gel method. These nanocapsule particles exhibited exceptional stability, with no observed ruptures, and demonstrated an enthalpy of melting measuring 181.5 J/g with minimal loss even after 200 phase-change cycles, highlighting their robust thermal reliability. Subsequently, these nanocapsules were integrated into cement-based materials, and various tests were carried out to evaluate their feasibility for building thermal energy storage (TES), encompassing hydration heat, compressive strength, and heat storage and release behavior. The results showed that incorporated nanocapsules accelerate the cement hydration process, with slight attenuation of compressive strength even at 10 wt% nanocapsule content as compared to the reported results. Furthermore, due to the excellent TES capabilities of ODE/SiO2 nanocapsules, this cement sample exhibited considerable reductions in peak temperatures under static heat source by 3.9 °C. This study endeavors to present a simple approach towards the development of ODE/SiO2 nanocapsules characterized by high latent heat, improved efficiency, and durability, paving the way for the construction of more robust and efficient thermal energy storage cement-based materials.