Imitation of the squeal of a pig.

1

a. 1842.  in Halliwell, Nursery Rhymes, 119. This little pig said Wee, wee, wee!

2

1860.  Hist. Five little Pigs, 31. Poor Piggy ran off crying out in great pain, ‘Wee! wee!! wee!!!’ all the way home.

3