In this paper, the $\beta^-$ decay rates in the magnetic field of neutron star are investigated under the conditions of different electron density, temperature, and decay energy. By considering the influence of magnetic field on the electron spectrum, we improve the Takahashi-Yokoi model and perform the calculations of $\beta^-$ decay rates for the nickel (Ni) isotopes, which are the typical neutron-rich nuclei participating in the rapid neutron-capture process ($r$-process). It is found that the $\beta^-$ decay rates are increased significantly in the extremely strong magnetic field ($B>10^{15}$ G). Furthermore, we find the oscillation of $\beta^-$ decay rates with the increasing of magnetic field strength, implying the magnitude of $\beta^-$ decay rates is closely related to not only the decay energy but also the environmental electron density. In contrast, the impact of temperature on the $\beta^-$ decay rates is found to be negligible in the range of $10^{7}$ K$<T<10^{10}$ K.