Phonosemantic compound. 土 represents the meaning and 黑 represents the sound. Originally written as 黑, which depicts a person whose face has been tattooed.
Shuowen Jiezi
《說文》:“墨,書墨也。从土,从黑,黑亦聲。”
Components
黑(sound, iconic) — Depicts a person whose face has been tattooed.