Canonical Reference: Dhp 130 Verified Source

“All tremble at violence; life is dear to all. Putting oneself in the place of another, one should neither kill nor cause others to kill.”

Canonical Pali Original: Sabbe tasanti daṇḍassa, sabbesaṃ jīvitaṃ piyaṃ; Attānaṃ upamaṃ katvā, na haneyya na ghātaye.

— Gautam Buddha
The Awakened One, Founder of Dhamma
Historical Setting & Context:

Pali Canon: Dhammapada 10.130 formulating the Golden Rule of Buddhist ethics (Attanam upamam katva - putting oneself in another's place).