Growth of the black holes (BHs) from the seeds to supermassive BHs (SMBHs, ~109M⊙) is not understood, but the mass accretion must have played an important role. We performed 2D radiation hydrodynamics simulations of line-driven disc winds considering the metallicity dependence in a wide range of the BH mass, and investigated the reduction of the mass accretion rate due to the wind mass-loss. Our results show that denser and faster disc winds appear at higher metallicities and larger BH masses. The accretion rate is suppressed to ~0.4-0.6 times the mass supply rate to the disc for the BH mass of MBHrsim105M⊙ in high-metallicity environments of Z ≳ Z⊙, while the wind mass-loss is negligible when the metallicity is subsolar (~0.1Z⊙). By developing a semi-analytical model, we found that the metallicity dependence of the line force and the BH mass dependence of the surface area of the wind launch region are the cause of the metallicity dependence (∝ Z2∕3) and BH mass dependencies (∝MBH4∕3 for MBH ≤ 106M⊙ and ∝ MBH for MBH ≥ 106M⊙) of the mass-loss rate. Our model suggests that the growth of BHs by the gas accretion effectively slows down in the regime ≳ 105M⊙ in metal-enriched environments ≳ Z⊙. This means that the line-driven disc winds may have an impact on late evolution of SMBHs.