Due to the various applications of nanocantilevers as nanosensors and nanoactuators in nanoelectromechanical systems, understanding their behavior is of particular importance. In operating environments, nanocantilevers are simultaneously exposed to mechanical forces and heat. This study aims to examine the behavior of an Euler–Bernoulli nanocantilever when it is placed under mechanical loads and exposed to heat at the same time. The effects of size, temperature, and force on the flexural behavior of the nanocantilever were investigated and the following characteristics were obtained via molecular dynamics simulation: nanocantilever displacement versus time, maximum bending, nanocantilever yielding time, and the minimum acceptable working frequency range for nanocantilever-based nanoswitches. It was found that applying forces greater than 0.00005eV/A, the studied nanocantilevers would rapidly undergo plastic deformation. For applied forces less than 0.00005eV/A, the nanocantilevers with length of 40nm, 30nm and 20nm can withstand upto 750K, 600K and 300K in 200ns to more than 1.5μs time period, respectively.