Surface and size effects are frequently important in the design of high-performance nano-sized devices. However, due to the influence of the small-scale impact, the classical theory fails to predict the size-dependent behavior of nanoscale devices. In this regard, the current work attempts to investigate the dynamic and mechanical behaviors of nanobeams using nonlocal elasticity theory and the recently proposed Moore–Gibson–Thompson (MGT) thermoelasticity theory while taking into account the surface effects. In the context of nonlocal elasticity and surface elasticity theories, the governing equation of motion for an Euler–Bernoulli nanobeam that is simply supported at both ends and has a uniform load on the top surface is first derived. Thereafter, the solution for deflection and temperature distribution along the thickness direction of the nanobeam is obtained based on MGT theory using the finite Fourier sine transform and Laplace transform techniques. The influences of nonlocal parameter, phase-lag time, residual surface tension, surface elastic modulus, thickness and length of nanobeam on deflection and temperature over time are systematically analyzed in depth. Some important points are highlighted regarding size dependency and surface effects on thermoelastic vibration of nanobeams in the present context. When surface and small-scale effects are included, this approach may be valuable in understanding the dynamic and mechanical behaviors of nanomechanical systems.