“One man cannot wrong another man. He can only wrong himself.”
Jack London wrote this in The Sea-Wolf.
Where it appears
“Not at all. One man cannot wrong another man. He can only wrong himself. As I see it, I do wrong always when I consider the interests of others. Don’t you see? How can two particles of the yeast wrong each other by striving to devour each other? It is their inborn heritage to strive to devour, and to strive not to be devoured. When they depart from this they sin.”
From the public-domain edition, read it free.