SUMMARYWe present a new approach based on coupling the extended finite element method (XFEM) and level sets to study surface and interface effects on the mechanical behavior of nanostructures. The coupled XFEM-level set approach enables a continuum solution to nanomechanical boundary value problems in which discontinuities in both strain and displacement due to surfaces and interfaces are easily handled, while simultaneously accounting for critical nanoscale surface effects, including surface energy, stress, elasticity and interface decohesion. We validate the proposed approach by studying the surface-stressdriven relaxation of homogeneous and bi-layer nanoplates as well as the contribution from the surface elasticity to the effective stiffness of nanobeams. For each case, we compare the numerical results with new analytical solutions that we have derived for these simple problems; for the problem involving the surface-stress-driven relaxation of a homogeneous nanoplate, we further validate the proposed approach by comparing the results with those obtained from both fully atomistic simulations and previous multiscale calculations based upon the surface Cauchy-Born model. These numerical results show that the proposed method can be used to gain critical insights into how surface effects impact the mechanical behavior and properties of homogeneous and composite nanobeams under generalized mechanical deformation.