The energy balance method is utilized to analyze the oscillation of a nonlinear nanoelectro-mechanical system resonator. The resonator comprises an electrode, which is embedded between two substrates. Two types of clamped-clamped and cantilever nano-resonators are studied. The effects of the van der Waals attractions, Casimir force, the small size, the fringing field, the mid-plane stretching, and the axial load are taken into account. The governing partial differential equation of the resonator is reduced using the Galerkin method. The energy method is applied to obtain an analytical solution without considering any linearization or small parameter. The results of the present study are compared with the results available in the literature. In addition, the results of the present analytical solution are compared with the Runge-Kutta numerical results. An excellent agreement between the present analytical solution, numerical solution, and the results available in the literature was found. The influences of the van der Waals force, Casimir force, size effect, and fringing field effect on the oscillation frequency of resonators are studied. The results indicate that the presence of the intermolecular forces (van der Waals), Casimir force, and fringing field effect decreases the oscillation frequency of the resonator.In contrast, the presence of the size effect increases the oscillation frequency of the resonator.