Recent models of the formation of ultra-luminous X-ray sources (ULXs) predict that they preferentially form in low-metallicity environments. We look at the metallicity of the nebula surrounding NGC 1313 X-2, one of the best-studied ULXs. Simple estimates, based on the extrapolation of the metallicity gradient within NGC 1313, or on empirical calibrations (relating metallicity to strong oxygen lines) suggest a quite low metal content (Z ~ 0.1 Zsun). But such estimates do not account for the remarkably strong X-ray flux irradiating the nebula. Then, we build photoionization models of the nebula using CLOUDY; using such models, the constraints on the metallicity weaken substantially, as we find 0.15 Zsun <= Z <= 0.5 Zsun.