Comes from the Confucian classic
孝经 (Xiàojīng, Classic of Filial Piety):
身体发肤,
受之父母,
不敢毁伤,
孝之始也 — 'Our body, hair, and skin are received from our parents; not daring to damage them is the beginning of filial piety.' This single quote is why traditional Chinese culture historically opposed cutting hair, tattooing, and self-harm.