ref
1940s: imitative.
Imitative of the sound.
oink (v.)
"to make a noise like a pig," by 1909, of imitative origin.