Toward the manipulation of a single atomic spin, we theoretically study the switching of a localized quantum spin S=(Sx, Sy, S z) induced by spin injection in electrode/S/electrode junctions. This S has a uniaxial anisotropy energy, - \D\S2z, which shows the bistable potential between Sz= - S and S, with D being an anisotropy constant. Furthermore, S interacts with the atomic vibration. For the initial state of Sz= - S, we consider a situation in which up-spin electrons exhibit the spinflip tunneling from the left electrode to the right one through an exchange interaction between the electron spin and S. Using the master equation approach, we investigate the time t dependence of the current I, the expectation value of Sz, 〈Sz〉, and that of the vibration quantum number, 〈n〉, of an S=2 system, which corresponds to an Fe atom on CuN surface. The systems exhibit the switching or nonswitching depending on the transition probability due to spin-atomic vibration interaction within a period of 10 ns. In addition, the t dependence of I and 〈n〉 is explained on the basis of 〈Sz〉 and the probability distribution.