In the current study, the simultaneous effect of warping function and elastic layer on the natural frequency of torsional vibration of nano-bars in the presence of a magnetic field is investigated, because changes in the elastic layer with considering the specified interval of diameter ratio for a nano-bar cause that maximum frequency occurred at various values of diameter ratio at that specified interval and as a result change the warping function. For this purpose, the governing equation of torsional nano-bar considering the warping function is extracted using Hamilton's principle. Also, nonlocal and length scale parameters were used to show the nanoscale. Then, the frequency is calculated for a nano-bar with any warping function using Galerkin's method. As regards, the torsional vibration, circular nano-bars are the most stable state, Therefore, it is expected that the maximum frequency occurred for the warping function with diameter ratio a = b, whereas the presence of the elastic layer causes the maximum frequency to occur for warp function with diameter ratio a not equal b. Thus, the change of elastic layer causes the maximum frequency at the various diameter ratio, and as a result, the various warping functions were obtained. Furthermore, the effect of warping functions on the softening stiffness and hardening-stiffness effects was analyzed. For validation, the frequency of the nano-bar is compared with the results obtained from the semi-analytical differential transform method and other theories available in the literature.