Theresonancefrequenciesandstabilityofananobeaminalongitudinalmagneticfieldareinvestigated.Tothisaim,athreedimensionalbeammodelisusedinwhichthesmall-scaleeffectistakenintoaccountbasedonthenonlocalelasticitytheory.TheLorentzforcesareobtainedintermsofthelocalelasticrotationsofthebeamandthethermalstressduetocurrentismodeledasanaxialcompressiveforce.UsingtheGalerkinmethod,thegoverningequationsofmotionaresolvedandthestabilityboundaryofthenanobeamisdetermined.