Yeah, you're thinking of Megaman Zero, Tiru -- the GBA stuff. Legends is something very significantly different, continuity wise, insofar as I'm aware. Do note that, while that scene was touching (well, I'd actually call it terribly desperate more than touching, but...), it was set in a world where the vast majority of the human population is dead, most of the remainder is under a tyrant, and much of the world has been rendered an unlivable hellscape (that is also populated by varying degrees of rampaging deathbot). If I'm not misremembered, a great deal of the plot of one of the the Zero games is trying to find a place for humans to live again, what few remain. It's also a scene where, if plotnanigans hadn't happened and they found zero, the scientist being protected would have been very much killed.
And humans did survive in that one, obj. Just... not very many. It might have been the X continuity that eventually ended up with them all dead, I'unno. I forget exactly how the Zero/ZX and X stuff mesh, if at all.
... really, the base Megaman stuff -- not X, Z, or Legends -- is probably the least thematically horrifying of the major stuff, and it still has a madman (or two) regularly holding vast swaths of the world hostage and probably involves a terrifying number of off camera deaths. It's... something about the presentation of the games tends to lend to not paying attention to it, but they're generally set in what are genuinely terrible scenarios. If it's not a crapsack world (X, Z) it's basically a deathworld (Legends, Z, X after a while), and in several of them it's painful obvious the human species is barely existent or has been massively damaged.