This paper systematically studies the relation between metallicity and mass loss of massive stars. We perform one-dimensional stellar evolution simulations and build a grid of $\sim$2000 models with initial masses ranging between 11 and 60 $M_{\odot}$ and absolute metallicities $Z$ between 0.00001 and 0.02. Steady-state winds, comprising hot main-sequence winds and cool supergiant winds, are the main drivers of the mass loss of massive stars in our models. We calculate the total mass loss over the stellar lifetime for each model. Our results reveal the existence of a critical metallicity $Z_{\rm{c}}$ at $Z \sim 10^{-3}$, where the mass loss exhibits a dramatic jump. If $Z>Z_{\rm{c}}$, massive stars tend to evolve into cool supergiants, and a robust cool wind is operational. In contrast, if $Z
Comment: 22 pages, 12 figures, accepted for publication in the Astrophysical Journal