The β − -decay rates of neutron-rich Zr and Mo isotopes are investigated within the deformed quasiparticle random-phase approximation with realistic nucleon-nucleon interactions. Axially symmetric deformations are considered in the calculations from a mean-field description of a quasiparticle picture and of both particle-hole and particle-particle excitations. The Brückner G matrix obtained with charge-dependent Bonn nucleon-nucleon forces is employed for residual particle-particle and particle-hole interactions. Contributions from both allowed Gammow-Teller and first-forbidden transitions are calculated and the sensitivity of the calculated results to the particle-particle strength is discussed. The calculated β-decay half-lives show a good agreement with the available experimental data. Moreover, predictions of β-decay half-lives are made for some extremely neutron-rich isotopes, which could be useful for future experiments.