How wettability influences thin liquid film boiling heat transfer should be challenging research in the nanoscale system. In this study, the effects of wettability on the nanoscale boiling heat transfer for a thin liquid film on hydrophilic and hydrophobic surfaces are investigated by molecular dynamics simulation. Results demonstrate that the hydrophilic surface has better heat transfer performance compared to the hydrophobic surface. It has a shorter boiling onset time, higher temperature, heat flux, interfacial thermal conductance, and weakened interfacial thermal resistance. The hydrophilic surface throughout has higher critical heat flux compared to the hydrophobic surface in both macro- and nanoscale systems. Besides, a two-dimensional surface potential energy is proposed to reveal the mechanism of wettability affecting the boiling heat transfer. The potential energy in one regular unit of hydrophilicity (-0.34 eV) is much higher than that of hydrophobicity (-0.09 eV). That is the crucial reason the heat transfer enhancement via improving surface wettability should be primarily the powerful surface potential energy. In addition, the interaction energy is calculated to further address the nucleation mechanism and heat transfer performance for liquid film on different wettability surfaces. The interaction energies arrange the order of <i>I</i><sub>phi</sub> (1.57 eV·nm<sup>-2</sup>) > <i>I</i><sub>water</sub> (0.48 eV·nm<sup>-2</sup>) > <i>I</i><sub>pho</sub> (0.26 eV·nm<sup>-2</sup>), indicating that the better heat transfer performance of hydrophilic is because of the large interaction energy between the solid/liquid interface. Besides, the bubble nucleation on a hydrophilic surface needs absorbing more energy and occurs inside the thin liquid film, while it needs absorbing less energy and triggers at the solid/liquid interface with hydrophobicity. Those uncover the principal mechanisms of how wettability influences the bubble nucleation and boiling heat transfer performance at the nanoscale.