In this study, the mechanics of deformation (under the tension) and the stability of an elastic beam with a nanocoating under an axial compression are investigated. The behavior of the construction is modeled by the two-layered beam. The basic relations of the first layer, that is, an elastic beam gives in the framework of Hook's law and the basic relations of the second layer, that is, the coating is carried out taking into account discreteness of the nanomaterial. First, the strain-stress relations of the elastic beam with nanocoating under axial tensile load are obtained. Then, stability equations of layered beam consisting of two elastic layers and elastic beam with the nanocoating subjected to a uniform axial compression are obtained, respectively. The dimensionless critical axial load parameter, that is, the ratio of the critical axial load of elastic beam with nanocoating to the critical axial load of layered beam consisting of two elastic layers is found. Finally, carrying out some computations, effects of the characteristics of a nanocoating on the values of the dimensionless critical axial load parameter have been studied.