It's from a scene in a comic from the late 70s to mid-80s. Probably from Secret Wars (1985), but I may be wrong. A few heroes are talking, and a difficult choice is being debated. Professor X says, "If we did that, we'd be no better than Hitler, Stalin, or Doctor Doom."
Crossposted at TVTropes YKTS.