In this study, microcapsules obtained by emulsion polymerization were prepared for applications for thermal energy storage that use melamine formaldehyde resin as the wall material and n-Octadecane as the phase change material, where cellulose nanofiber (CNF) was used as an emulsion stabilizer. The results of CNF addition, core-to-wall mass ratio and reaction stirring rate on the attributes of microcapsules were investigated. The thermal attributes and the morphology of microcapsules were investigated by Scanner electron microscopy (SEM), Fourier transform infrared (FTIR), synchronous thermal analyzer (TA), differential scanning calorimeter (DSC), and X-ray diffraction (XRD). The findings revealed that the microcapsules up to the highest efficiency of encapsulation and energy storage of 59.1% and 58.5%, respectively, were achieved when the CNF addition was 0.2 wt%, the core-to-wall mass ratio was 3:3.69, and the stirring rate was 1000 r/min. This work uses CNF as an emulsion stabilizer instead of conventional emulsifiers, which reduces the burden on the environment and provides a sustainable method for thermal energy storage and conversion.